2026-03-18 20:12:09 +01:00
|
|
|
name: e-ticket
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
php:
|
|
|
|
|
build:
|
|
|
|
|
context: ./docker/php/prod
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
deploy:
|
|
|
|
|
replicas: 2
|
2026-03-26 11:24:27 +01:00
|
|
|
resources:
|
|
|
|
|
limits:
|
2026-03-26 11:25:35 +01:00
|
|
|
cpus: "1.5"
|
|
|
|
|
memory: 1G
|
2026-03-26 11:24:27 +01:00
|
|
|
reservations:
|
2026-03-26 11:25:35 +01:00
|
|
|
cpus: "0.5"
|
|
|
|
|
memory: 256M
|
2026-03-18 20:12:09 +01:00
|
|
|
restart: unless-stopped
|
2026-03-26 10:53:28 +01:00
|
|
|
group_add:
|
|
|
|
|
- "{{ docker_gid }}"
|
2026-03-18 20:12:09 +01:00
|
|
|
volumes:
|
|
|
|
|
- .:/app
|
Redesign admin Infra page: full-screen 4-column layout with Docker stats
Complete rewrite of /admin/infra into 4 columns:
- Col 1 (Serveur): CPU, RAM, Disk, System, Services (Caddy, Docker, SSL cert)
- Col 2 (Containers): All Docker containers with CPU%, RAM, state via Docker API
- Col 3 (Redis): Global stats + per-DB (Messenger, Sessions, Cache)
- Col 4 (PostgreSQL): Instance stats + PgBouncer pools/stats
Extract all infra logic into InfraService. Mount Docker socket (read-only)
in PHP container for container stats. Check SSL cert expiry and Caddy status.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:51:04 +01:00
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
2026-03-18 20:12:09 +01:00
|
|
|
ports:
|
2026-03-20 12:52:01 +01:00
|
|
|
- "4578-4579:9000"
|
2026-03-20 14:16:10 +01:00
|
|
|
networks:
|
|
|
|
|
- e-ticket
|
2026-03-18 20:12:09 +01:00
|
|
|
depends_on:
|
|
|
|
|
pgbouncer:
|
2026-03-20 14:20:42 +01:00
|
|
|
condition: service_healthy
|
2026-03-18 20:12:09 +01:00
|
|
|
redis:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
|
|
db-master:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
restart: unless-stopped
|
2026-03-26 11:24:27 +01:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
2026-03-26 11:25:35 +01:00
|
|
|
cpus: "2.0"
|
|
|
|
|
memory: 4G
|
2026-03-26 11:24:27 +01:00
|
|
|
reservations:
|
|
|
|
|
cpus: "0.5"
|
2026-03-26 11:25:35 +01:00
|
|
|
memory: 1G
|
2026-03-18 20:12:09 +01:00
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: e-ticket
|
2026-03-20 13:26:38 +01:00
|
|
|
POSTGRES_PASSWORD: {{ db_password }}
|
2026-03-18 20:12:09 +01:00
|
|
|
POSTGRES_DB: e-ticket
|
|
|
|
|
command:
|
|
|
|
|
- postgres
|
|
|
|
|
- -c
|
|
|
|
|
- wal_level=replica
|
|
|
|
|
- -c
|
|
|
|
|
- max_wal_senders=3
|
|
|
|
|
- -c
|
|
|
|
|
- wal_keep_size=64MB
|
|
|
|
|
- -c
|
|
|
|
|
- hot_standby=on
|
2026-03-26 11:25:35 +01:00
|
|
|
- -c
|
|
|
|
|
- shared_buffers=1GB
|
|
|
|
|
- -c
|
|
|
|
|
- effective_cache_size=3GB
|
|
|
|
|
- -c
|
|
|
|
|
- work_mem=16MB
|
2026-03-18 20:12:09 +01:00
|
|
|
volumes:
|
|
|
|
|
- db-master-data:/var/lib/postgresql/data
|
2026-03-20 13:45:58 +01:00
|
|
|
- ./docker/pgsql/init-master.sh:/docker-entrypoint-initdb.d/init-master.sh
|
2026-03-20 14:16:10 +01:00
|
|
|
networks:
|
|
|
|
|
- e-ticket
|
2026-03-18 20:12:09 +01:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U e-ticket -d e-ticket"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
|
|
|
|
|
db-slave:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
restart: unless-stopped
|
2026-03-26 11:24:27 +01:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
2026-03-26 11:25:35 +01:00
|
|
|
cpus: "1.5"
|
|
|
|
|
memory: 2G
|
2026-03-26 11:24:27 +01:00
|
|
|
reservations:
|
|
|
|
|
cpus: "0.25"
|
2026-03-26 11:25:35 +01:00
|
|
|
memory: 512M
|
2026-03-18 20:12:09 +01:00
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: e-ticket
|
2026-03-20 13:26:38 +01:00
|
|
|
POSTGRES_PASSWORD: {{ db_password }}
|
2026-03-18 20:12:09 +01:00
|
|
|
POSTGRES_DB: e-ticket
|
|
|
|
|
PGDATA: /var/lib/postgresql/data
|
|
|
|
|
volumes:
|
|
|
|
|
- db-slave-data:/var/lib/postgresql/data
|
|
|
|
|
- ./docker/pgsql/init-slave.sh:/init-slave.sh
|
|
|
|
|
entrypoint: ["/bin/bash", "/init-slave.sh"]
|
|
|
|
|
command: ["postgres"]
|
2026-03-20 14:16:10 +01:00
|
|
|
networks:
|
|
|
|
|
- e-ticket
|
2026-03-18 20:12:09 +01:00
|
|
|
depends_on:
|
|
|
|
|
db-master:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U e-ticket -d e-ticket"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
|
|
|
|
|
pgbouncer:
|
|
|
|
|
image: edoburu/pgbouncer
|
|
|
|
|
restart: unless-stopped
|
2026-03-26 11:24:27 +01:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
2026-03-26 11:25:35 +01:00
|
|
|
cpus: "0.5"
|
|
|
|
|
memory: 128M
|
2026-03-26 11:24:27 +01:00
|
|
|
reservations:
|
2026-03-26 11:25:35 +01:00
|
|
|
cpus: "0.1"
|
|
|
|
|
memory: 32M
|
2026-03-18 20:12:09 +01:00
|
|
|
volumes:
|
2026-03-20 14:07:16 +01:00
|
|
|
- ./docker/pgsql/pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini:ro
|
|
|
|
|
- ./docker/pgsql/userlist.txt:/etc/pgbouncer/userlist.txt:ro
|
2026-03-20 14:16:10 +01:00
|
|
|
networks:
|
|
|
|
|
- e-ticket
|
2026-03-18 20:12:09 +01:00
|
|
|
depends_on:
|
|
|
|
|
db-master:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
db-slave:
|
|
|
|
|
condition: service_healthy
|
2026-03-20 14:20:42 +01:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -p 6432 -U e-ticket"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
2026-03-18 20:12:09 +01:00
|
|
|
|
|
|
|
|
messenger:
|
|
|
|
|
build:
|
|
|
|
|
context: ./docker/php/prod
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
command: php bin/console messenger:consume async --time-limit=3600 --memory-limit=256M --limit=500 -vv
|
|
|
|
|
deploy:
|
|
|
|
|
replicas: 2
|
2026-03-26 11:24:27 +01:00
|
|
|
resources:
|
|
|
|
|
limits:
|
2026-03-26 11:25:35 +01:00
|
|
|
cpus: "1.0"
|
|
|
|
|
memory: 512M
|
2026-03-26 11:24:27 +01:00
|
|
|
reservations:
|
2026-03-26 11:25:35 +01:00
|
|
|
cpus: "0.25"
|
|
|
|
|
memory: 128M
|
2026-03-18 20:12:09 +01:00
|
|
|
restart: unless-stopped
|
|
|
|
|
volumes:
|
|
|
|
|
- .:/app
|
2026-03-20 14:16:10 +01:00
|
|
|
networks:
|
|
|
|
|
- e-ticket
|
2026-03-18 20:12:09 +01:00
|
|
|
depends_on:
|
|
|
|
|
pgbouncer:
|
2026-03-20 14:20:42 +01:00
|
|
|
condition: service_healthy
|
2026-03-18 20:12:09 +01:00
|
|
|
redis:
|
|
|
|
|
condition: service_healthy
|
2026-03-26 09:04:27 +01:00
|
|
|
meilisearch:
|
2026-04-01 17:19:13 +02:00
|
|
|
condition: service_healthy
|
2026-03-18 20:12:09 +01:00
|
|
|
|
|
|
|
|
redis:
|
|
|
|
|
image: redis:7-alpine
|
|
|
|
|
restart: unless-stopped
|
2026-03-26 11:24:27 +01:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
2026-03-26 11:25:35 +01:00
|
|
|
cpus: "1.0"
|
|
|
|
|
memory: 1G
|
2026-03-26 11:24:27 +01:00
|
|
|
reservations:
|
2026-03-26 11:25:35 +01:00
|
|
|
cpus: "0.25"
|
|
|
|
|
memory: 128M
|
|
|
|
|
command: redis-server --requirepass {{ redis_password }} --maxmemory 768mb --maxmemory-policy allkeys-lru
|
2026-03-18 20:12:09 +01:00
|
|
|
volumes:
|
|
|
|
|
- redis-data:/data
|
2026-03-20 14:16:10 +01:00
|
|
|
networks:
|
|
|
|
|
- e-ticket
|
2026-03-18 20:12:09 +01:00
|
|
|
healthcheck:
|
2026-03-20 13:26:38 +01:00
|
|
|
test: ["CMD", "redis-cli", "-a", "{{ redis_password }}", "ping"]
|
2026-03-18 20:12:09 +01:00
|
|
|
interval: 5s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
|
2026-03-18 21:59:22 +01:00
|
|
|
meilisearch:
|
2026-04-03 14:06:16 +02:00
|
|
|
image: getmeili/meilisearch:v1.40.0
|
2026-03-18 21:59:22 +01:00
|
|
|
restart: unless-stopped
|
2026-03-26 11:24:27 +01:00
|
|
|
deploy:
|
|
|
|
|
resources:
|
|
|
|
|
limits:
|
2026-03-26 11:25:35 +01:00
|
|
|
cpus: "1.0"
|
|
|
|
|
memory: 1G
|
2026-03-26 11:24:27 +01:00
|
|
|
reservations:
|
2026-03-26 11:25:35 +01:00
|
|
|
cpus: "0.25"
|
|
|
|
|
memory: 256M
|
2026-03-18 21:59:22 +01:00
|
|
|
environment:
|
2026-03-20 13:26:38 +01:00
|
|
|
MEILI_MASTER_KEY: {{ meilisearch_master_key }}
|
2026-03-18 21:59:22 +01:00
|
|
|
MEILI_ENV: production
|
|
|
|
|
MEILI_NO_ANALYTICS: true
|
|
|
|
|
volumes:
|
|
|
|
|
- meilisearch-data:/meili_data
|
2026-03-20 14:16:10 +01:00
|
|
|
networks:
|
|
|
|
|
- e-ticket
|
2026-04-01 17:19:13 +02:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "curl", "-sf", "http://localhost:7700/health"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
2026-03-26 11:24:27 +01:00
|
|
|
|
2026-03-20 14:16:10 +01:00
|
|
|
networks:
|
|
|
|
|
e-ticket:
|
|
|
|
|
driver: bridge
|
2026-03-18 21:59:22 +01:00
|
|
|
|
2026-03-18 20:12:09 +01:00
|
|
|
volumes:
|
|
|
|
|
db-master-data:
|
|
|
|
|
db-slave-data:
|
|
|
|
|
redis-data:
|
2026-03-18 21:59:22 +01:00
|
|
|
meilisearch-data:
|