mirror of
https://github.com/ChrispyBacon-dev/DockFlare.git
synced 2026-04-26 10:50:43 +00:00
added compose example for email services in case no email services are present in the active compose
This commit is contained in:
parent
5e4ff1f4a9
commit
aba3499de4
12 changed files with 152 additions and 1 deletions
|
|
@ -764,6 +764,7 @@
|
|||
"email.container_stopped": "Mail Manager or Webmail stopped",
|
||||
"email.container_missing_title": "Email Services Not Found",
|
||||
"email.container_missing_desc": "The email services are not present in your Docker setup. Update your docker-compose.yml to include the email profile services.",
|
||||
"email.container_missing_compose_btn": "Copy latest docker-compose.yml",
|
||||
"email.webmail_link": "Open Webmail",
|
||||
"email.container_status": "Container Status",
|
||||
"email.statistics": "Statistics",
|
||||
|
|
|
|||
|
|
@ -764,6 +764,7 @@
|
|||
"email.container_stopped": "Mail Manager or Webmail stopped",
|
||||
"email.container_missing_title": "Email Services Not Found",
|
||||
"email.container_missing_desc": "The email services are not present in your Docker setup. Update your docker-compose.yml to include the email profile services.",
|
||||
"email.container_missing_compose_btn": "Copy latest docker-compose.yml",
|
||||
"email.webmail_link": "Open Webmail",
|
||||
"email.container_status": "Container Status",
|
||||
"email.statistics": "Statistics",
|
||||
|
|
|
|||
|
|
@ -768,6 +768,7 @@
|
|||
"email.container_stopped": "Mail Manager or Webmail stopped",
|
||||
"email.container_missing_title": "Email Services Not Found",
|
||||
"email.container_missing_desc": "The email services are not present in your Docker setup. Update your docker-compose.yml to include the email profile services.",
|
||||
"email.container_missing_compose_btn": "Copy latest docker-compose.yml",
|
||||
"email.webmail_link": "Open Webmail",
|
||||
"email.container_status": "Container Status",
|
||||
"email.statistics": "Statistics",
|
||||
|
|
|
|||
|
|
@ -764,6 +764,7 @@
|
|||
"email.container_stopped": "Mail Manager or Webmail stopped",
|
||||
"email.container_missing_title": "Email Services Not Found",
|
||||
"email.container_missing_desc": "The email services are not present in your Docker setup. Update your docker-compose.yml to include the email profile services.",
|
||||
"email.container_missing_compose_btn": "Copy latest docker-compose.yml",
|
||||
"email.webmail_link": "Open Webmail",
|
||||
"email.container_status": "Container Status",
|
||||
"email.statistics": "Statistics",
|
||||
|
|
|
|||
|
|
@ -764,6 +764,7 @@
|
|||
"email.container_stopped": "Mail Manager or Webmail stopped",
|
||||
"email.container_missing_title": "Email Services Not Found",
|
||||
"email.container_missing_desc": "The email services are not present in your Docker setup. Update your docker-compose.yml to include the email profile services.",
|
||||
"email.container_missing_compose_btn": "Copy latest docker-compose.yml",
|
||||
"email.webmail_link": "Open Webmail",
|
||||
"email.container_status": "Container Status",
|
||||
"email.statistics": "Statistics",
|
||||
|
|
|
|||
|
|
@ -764,6 +764,7 @@
|
|||
"email.container_stopped": "Mail Manager or Webmail stopped",
|
||||
"email.container_missing_title": "Email Services Not Found",
|
||||
"email.container_missing_desc": "The email services are not present in your Docker setup. Update your docker-compose.yml to include the email profile services.",
|
||||
"email.container_missing_compose_btn": "Copy latest docker-compose.yml",
|
||||
"email.webmail_link": "Open Webmail",
|
||||
"email.container_status": "Container Status",
|
||||
"email.statistics": "Statistics",
|
||||
|
|
|
|||
|
|
@ -764,6 +764,7 @@
|
|||
"email.container_stopped": "Mail Manager or Webmail stopped",
|
||||
"email.container_missing_title": "Email Services Not Found",
|
||||
"email.container_missing_desc": "The email services are not present in your Docker setup. Update your docker-compose.yml to include the email profile services.",
|
||||
"email.container_missing_compose_btn": "Copy latest docker-compose.yml",
|
||||
"email.webmail_link": "Open Webmail",
|
||||
"email.container_status": "Container Status",
|
||||
"email.statistics": "Statistics",
|
||||
|
|
|
|||
|
|
@ -764,6 +764,7 @@
|
|||
"email.container_stopped": "Mail Manager or Webmail stopped",
|
||||
"email.container_missing_title": "Email Services Not Found",
|
||||
"email.container_missing_desc": "The email services are not present in your Docker setup. Update your docker-compose.yml to include the email profile services.",
|
||||
"email.container_missing_compose_btn": "Copy latest docker-compose.yml",
|
||||
"email.webmail_link": "Open Webmail",
|
||||
"email.container_status": "Container Status",
|
||||
"email.statistics": "Statistics",
|
||||
|
|
|
|||
|
|
@ -764,6 +764,7 @@
|
|||
"email.container_stopped": "Mail Manager or Webmail stopped",
|
||||
"email.container_missing_title": "Email Services Not Found",
|
||||
"email.container_missing_desc": "The email services are not present in your Docker setup. Update your docker-compose.yml to include the email profile services.",
|
||||
"email.container_missing_compose_btn": "Copy latest docker-compose.yml",
|
||||
"email.webmail_link": "Open Webmail",
|
||||
"email.container_status": "Container Status",
|
||||
"email.statistics": "Statistics",
|
||||
|
|
|
|||
|
|
@ -764,6 +764,7 @@
|
|||
"email.container_stopped": "Mail Manager or Webmail stopped",
|
||||
"email.container_missing_title": "Email Services Not Found",
|
||||
"email.container_missing_desc": "The email services are not present in your Docker setup. Update your docker-compose.yml to include the email profile services.",
|
||||
"email.container_missing_compose_btn": "Copy latest docker-compose.yml",
|
||||
"email.webmail_link": "Open Webmail",
|
||||
"email.container_status": "Container Status",
|
||||
"email.statistics": "Statistics",
|
||||
|
|
|
|||
|
|
@ -2070,6 +2070,14 @@ async function deleteIdP(friendlyName) {
|
|||
}
|
||||
}
|
||||
|
||||
async function emailCopyCompose(btn) {
|
||||
const content = document.getElementById('composeContent').innerText;
|
||||
await navigator.clipboard.writeText(content);
|
||||
const original = btn.innerText;
|
||||
btn.innerText = 'Copied!';
|
||||
setTimeout(() => { btn.innerText = original; }, 2000);
|
||||
}
|
||||
|
||||
async function emailCheckPermissions() {
|
||||
try {
|
||||
const response = await fetch('/email/check-permissions', {
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-current shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /></svg>
|
||||
<div>
|
||||
<span class="font-semibold">{{ t('email.container_missing_title') }}</span><br>
|
||||
<span class="text-sm">{{ t('email.container_missing_desc') }}</span><br>
|
||||
<span class="text-sm">{{ t('email.container_missing_desc') }} <button class="link link-warning font-medium" onclick="document.getElementById('composeModal').showModal()">{{ t('email.container_missing_compose_btn') }}</button></span><br>
|
||||
<code class="text-sm mt-2 block">docker compose --profile email up -d</code>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -519,6 +519,139 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<dialog id="composeModal" class="modal">
|
||||
<div class="modal-box max-w-3xl">
|
||||
<h3 class="font-bold text-lg mb-1">docker-compose.yml</h3>
|
||||
<p class="text-sm opacity-60 mb-4">Copy this file, replace the <code>TLD</code> placeholders with your domain, then run <code>docker compose --profile email up -d</code>.</p>
|
||||
<div class="relative">
|
||||
<button onclick="emailCopyCompose(this)" class="btn btn-xs btn-ghost absolute top-2 right-2 z-10 opacity-70 hover:opacity-100">Copy</button>
|
||||
<pre id="composeContent" class="bg-base-200 rounded-lg p-4 text-xs overflow-x-auto overflow-y-auto max-h-[60vh] whitespace-pre">version: '3.8'
|
||||
|
||||
services:
|
||||
docker-socket-proxy:
|
||||
image: tecnativa/docker-socket-proxy:v0.4.1
|
||||
container_name: docker-socket-proxy
|
||||
restart: unless-stopped
|
||||
logging:
|
||||
driver: "none"
|
||||
environment:
|
||||
- DOCKER_HOST=unix:///var/run/docker.sock
|
||||
- CONTAINERS=1
|
||||
- EVENTS=1
|
||||
- NETWORKS=1
|
||||
- IMAGES=1
|
||||
- POST=1
|
||||
- PING=1
|
||||
- INFO=1
|
||||
- EXEC=1
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
networks:
|
||||
- dockflare-internal
|
||||
|
||||
dockflare-init:
|
||||
image: alpine:3.20
|
||||
command: ["sh", "-c", "chown -R ${DOCKFLARE_UID:-65532}:${DOCKFLARE_GID:-65532} /app/data"]
|
||||
volumes:
|
||||
- dockflare_data:/app/data
|
||||
networks:
|
||||
- dockflare-internal
|
||||
restart: "no"
|
||||
|
||||
dockflare:
|
||||
image: alplat/dockflare:stable
|
||||
container_name: dockflare
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5000:5000"
|
||||
labels:
|
||||
- dockflare.enable=true
|
||||
- dockflare.hostname=dockflare.TLD # replace with your domain
|
||||
- dockflare.service=http://dockflare:5000
|
||||
volumes:
|
||||
- dockflare_data:/app/data
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
- REDIS_DB_INDEX=0
|
||||
- DOCKER_HOST=tcp://docker-socket-proxy:2375
|
||||
depends_on:
|
||||
docker-socket-proxy:
|
||||
condition: service_started
|
||||
dockflare-init:
|
||||
condition: service_completed_successfully
|
||||
redis:
|
||||
condition: service_started
|
||||
networks:
|
||||
- cloudflare-net
|
||||
- dockflare-internal
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: dockflare-redis
|
||||
restart: unless-stopped
|
||||
command: ["redis-server", "--save", "", "--appendonly", "no"]
|
||||
logging:
|
||||
driver: "none"
|
||||
volumes:
|
||||
- dockflare_redis:/data
|
||||
networks:
|
||||
- dockflare-internal
|
||||
|
||||
dockflare-mail-manager:
|
||||
image: alplat/dockflare-mail-manager:stable
|
||||
container_name: dockflare-mail-manager
|
||||
restart: unless-stopped
|
||||
profiles: ["email"]
|
||||
environment:
|
||||
- DOCKFLARE_MASTER_URL=http://dockflare:5000
|
||||
- MAIL_DATA_PATH=/data
|
||||
volumes:
|
||||
- mail_data:/data
|
||||
depends_on:
|
||||
dockflare:
|
||||
condition: service_started
|
||||
networks:
|
||||
- cloudflare-net
|
||||
- dockflare-internal
|
||||
|
||||
dockflare-webmail:
|
||||
image: alplat/dockflare-webmail:stable
|
||||
container_name: dockflare-webmail
|
||||
restart: unless-stopped
|
||||
profiles: ["email"]
|
||||
environment:
|
||||
- DOCKFLARE_MASTER_URL=https://dockflare.TLD # replace with your domain
|
||||
labels:
|
||||
- dockflare.enable=true
|
||||
- dockflare.hostname=mail.dockflare.TLD # replace with your domain
|
||||
- dockflare.service=http://dockflare-webmail:80
|
||||
depends_on:
|
||||
dockflare-mail-manager:
|
||||
condition: service_started
|
||||
networks:
|
||||
- cloudflare-net
|
||||
- dockflare-internal
|
||||
|
||||
volumes:
|
||||
dockflare_data:
|
||||
dockflare_redis:
|
||||
mail_data:
|
||||
|
||||
networks:
|
||||
cloudflare-net:
|
||||
name: cloudflare-net
|
||||
external: true
|
||||
dockflare-internal:
|
||||
name: dockflare-internal</pre>
|
||||
</div>
|
||||
<div class="modal-action">
|
||||
<form method="dialog"><button class="btn btn-ghost btn-sm">Close</button></form>
|
||||
<button onclick="emailCopyCompose(this)" class="btn btn-primary btn-sm">Copy to Clipboard</button>
|
||||
</div>
|
||||
</div>
|
||||
<form method="dialog" class="modal-backdrop"><button>close</button></form>
|
||||
</dialog>
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => { emailCheckPermissions(); emailLoadOrphanedDomains(); emailLoadStats(); emailLoadMailboxStats(); emailLoadDeliveryStats(); emailLoadAllCatchAllStatuses(); emailLoadAutoResponderBadges(); if (sessionStorage.getItem('logsModalOpen')) emailOpenLogsModal(); });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue