Tots els compose
This commit is contained in:
100
mautic/docker-compose.yml
Normal file
100
mautic/docker-compose.yml
Normal file
@@ -0,0 +1,100 @@
|
||||
# /opt/stacks/mautic/docker-compose.yml
|
||||
|
||||
services:
|
||||
|
||||
# ── MariaDB per a Mautic ─────────────────
|
||||
db:
|
||||
container_name: mautic-db
|
||||
image: mariadb:10.11
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
TZ: Europe/Madrid
|
||||
MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'
|
||||
MYSQL_DATABASE: mautic
|
||||
MYSQL_USER: mautic
|
||||
MYSQL_PASSWORD: '${MYSQL_PASSWORD}'
|
||||
volumes:
|
||||
- mautic_db:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
networks: [mautic_net]
|
||||
|
||||
# ── Mautic — Aplicació principal (web) ───
|
||||
mautic_web:
|
||||
container_name: mautic-web
|
||||
image: mautic/mautic:6-apache # Actualitzat a Mautic 6
|
||||
restart: unless-stopped
|
||||
env_file: .mautic_env # Variables específiques de Mautic
|
||||
environment:
|
||||
TZ: Europe/Madrid
|
||||
MAUTIC_ROLE: mautic_web # Mode natiu de la imatge oficial
|
||||
volumes:
|
||||
- mautic_config:/var/www/html/config # Configuració local.php
|
||||
- mautic_logs:/var/www/html/var/logs # Logs de l'aplicació
|
||||
- mautic_media:/var/www/html/docroot/media # Fitxers pujats i generats
|
||||
ports:
|
||||
- "127.0.0.1:8083:80"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/mtc.js"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 60s
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
networks: [mautic_net, shared_net]
|
||||
|
||||
# ── Mautic Worker — processa cues async ──
|
||||
mautic_worker:
|
||||
container_name: mautic-worker
|
||||
image: mautic/mautic:6-apache
|
||||
restart: unless-stopped
|
||||
env_file: .mautic_env
|
||||
environment:
|
||||
TZ: Europe/Madrid
|
||||
MAUTIC_ROLE: mautic_worker # Mode worker natiu
|
||||
MAUTIC_MESSENGER_CONSUME_OPTS: '--time-limit=300 --memory-limit=128M'
|
||||
volumes:
|
||||
- mautic_config:/var/www/html/config
|
||||
- mautic_logs:/var/www/html/var/logs
|
||||
- mautic_media:/var/www/html/docroot/media
|
||||
depends_on:
|
||||
mautic_web:
|
||||
condition: service_healthy
|
||||
networks: [mautic_net]
|
||||
|
||||
# ── Mautic Cron — tasques programades ────
|
||||
mautic_cron:
|
||||
container_name: mautic-cron
|
||||
image: mautic/mautic:6-apache
|
||||
restart: unless-stopped
|
||||
env_file: .mautic_env
|
||||
environment:
|
||||
TZ: Europe/Madrid
|
||||
MAUTIC_ROLE: mautic_cron # Mode cron natiu — gestiona tots els jobs
|
||||
volumes:
|
||||
- mautic_config:/var/www/html/config
|
||||
- mautic_logs:/var/www/html/var/logs
|
||||
- mautic_media:/var/www/html/docroot/media
|
||||
depends_on:
|
||||
mautic_web:
|
||||
condition: service_healthy
|
||||
networks: [mautic_net]
|
||||
|
||||
volumes:
|
||||
mautic_db:
|
||||
mautic_config:
|
||||
mautic_logs:
|
||||
mautic_media:
|
||||
|
||||
networks:
|
||||
mautic_net:
|
||||
driver: bridge
|
||||
shared_net:
|
||||
external: true
|
||||
name: shared_net
|
||||
Reference in New Issue
Block a user