Files
e-ticket/docker-compose-dev.yml

203 lines
4.4 KiB
YAML
Raw Normal View History

services:
php:
build:
context: ./docker/php/dev
dockerfile: Dockerfile
container_name: e_ticket_php
restart: unless-stopped
volumes:
- .:/app
ports:
- "9000:9000"
depends_on:
pgbouncer:
condition: service_healthy
redis:
condition: service_healthy
database:
image: postgres:16-alpine
container_name: e_ticket_database
environment:
POSTGRES_USER: app
POSTGRES_PASSWORD: secret
POSTGRES_DB: e_ticket
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app -d e_ticket"]
interval: 5s
timeout: 5s
retries: 5
pgbouncer:
image: edoburu/pgbouncer
container_name: e_ticket_pgbouncer
volumes:
- ./docker/pgsql/pgbouncer-dev.ini:/etc/pgbouncer/pgbouncer.ini:ro
- ./docker/pgsql/userlist-dev.txt:/etc/pgbouncer/userlist.txt:ro
ports:
- "6432:6432"
depends_on:
database:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -p 6432 -U app"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: e_ticket_redis
command: redis-server --requirepass e_ticket
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "-a", "e_ticket", "ping"]
interval: 5s
timeout: 5s
retries: 5
caddy:
image: caddy:2-alpine
container_name: e_ticket_caddy
ports:
- "8000:80"
volumes:
- ./docker/caddy/Caddyfile:/etc/caddy/Caddyfile
- .:/app
depends_on:
- php
messenger:
build:
context: ./docker/php/dev
dockerfile: Dockerfile
container_name: e_ticket_messenger
command: php bin/console messenger:consume async -vv
restart: unless-stopped
volumes:
- .:/app
depends_on:
pgbouncer:
condition: service_healthy
redis:
condition: service_healthy
meilisearch:
condition: service_started
bun:
image: oven/bun:alpine
container_name: e_ticket_bun
working_dir: /app
volumes:
- .:/app
- bun-modules:/app/node_modules
command: sh -c "bun install && bun run dev"
ports:
- "5173:5173"
mailpit:
image: axllent/mailpit
container_name: e_ticket_mailpit
ports:
- "1025:1025"
- "8025:8025"
vault:
image: hashicorp/vault:latest
container_name: e_ticket_vault
cap_add:
- IPC_LOCK
environment:
VAULT_DEV_ROOT_TOKEN_ID: e_ticket
VAULT_DEV_LISTEN_ADDRESS: 0.0.0.0:8200
ports:
- "8200:8200"
volumes:
- vault-data:/vault/file
ngrok:
image: ngrok/ngrok:latest
container_name: e_ticket_ngrok
command: http caddy:80 --log stdout
environment:
NGROK_AUTHTOKEN: GXtZtKtRxRF5TFV5pCKD_25f1ALUyQQ9LkyQJgv1dr
ports:
- "4040:4040"
depends_on:
- caddy
ngrok-sync:
image: curlimages/curl:latest
container_name: e_ticket_ngrok_sync
user: "0:0"
volumes:
- .:/app
- ./docker/ngrok/sync.sh:/sync.sh
depends_on:
- ngrok
entrypoint: sh /sync.sh
meilisearch:
image: getmeili/meilisearch:latest
container_name: e_ticket_meilisearch
environment:
MEILI_MASTER_KEY: e_ticket
MEILI_ENV: development
ports:
- "7700:7700"
volumes:
- meilisearch-data:/meili_data
Add LibreTranslate auto-translation, improve test coverage, fix code duplication Translation system: - Add LibreTranslate container (dev + prod), CPU-only, no port exposed, FR/EN/ES/DE/IT - Create app:translate command: reads *.fr.yaml, translates incrementally, preserves placeholders - Makefile: make trans / make trans_prod (stops container after translation) - Ansible: start libretranslate -> translate -> stop during deploy - Prod container restart: "no" (only runs during deploy) - .gitignore: ignore generated *.en/es/de/it.yaml files - 11 tests for TranslateCommand (API unreachable, empty, incremental, obsolete keys, placeholders, fallback) Test coverage improvements: - OrderController: event ended (400), invalid cart JSON, invalid email, stock zero (4 new tests) - AccountController: finance stats all statuses (paid/pending/refunded/cancelled), soldCounts (2 new tests) - JS cart: checkout without error elements, hide error on retry, stock polling edge cases (singular, no label, qty zero, unknown billet) (8 new tests) - JS editor: comment node sanitization (1 new test) - JS tabs: missing panel, generated id, parent null, click no-panel (5 new tests) Code duplication fixes: - MeilisearchConsistencyCommand: extract diffAndReport() method (was duplicated 3x) - Email templates: extract _order_items_table.html.twig partial (shared by notification + cancelled) - SonarQube: exclude src/Entity/** from CPD (getters/setters duplication) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 11:44:13 +01:00
libretranslate:
image: libretranslate/libretranslate:latest
container_name: e_ticket_libretranslate
environment:
LT_LOAD_ONLY: fr,en,es,de,it
LT_DISABLE_WEB_UI: "true"
volumes:
- libretranslate-data:/home/libretranslate/.local
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:5000/languages || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 120s
cron:
build:
context: ./docker/cron
dockerfile: Dockerfile
container_name: e_ticket_cron
restart: unless-stopped
volumes:
- .:/app
depends_on:
pgbouncer:
condition: service_healthy
redis:
condition: service_healthy
redisinsight:
image: redis/redisinsight:latest
container_name: e_ticket_redisinsight
ports:
- "5540:5540"
depends_on:
redis:
condition: service_healthy
volumes:
db-data:
redis-data:
bun-modules:
vault-data:
meilisearch-data:
Add LibreTranslate auto-translation, improve test coverage, fix code duplication Translation system: - Add LibreTranslate container (dev + prod), CPU-only, no port exposed, FR/EN/ES/DE/IT - Create app:translate command: reads *.fr.yaml, translates incrementally, preserves placeholders - Makefile: make trans / make trans_prod (stops container after translation) - Ansible: start libretranslate -> translate -> stop during deploy - Prod container restart: "no" (only runs during deploy) - .gitignore: ignore generated *.en/es/de/it.yaml files - 11 tests for TranslateCommand (API unreachable, empty, incremental, obsolete keys, placeholders, fallback) Test coverage improvements: - OrderController: event ended (400), invalid cart JSON, invalid email, stock zero (4 new tests) - AccountController: finance stats all statuses (paid/pending/refunded/cancelled), soldCounts (2 new tests) - JS cart: checkout without error elements, hide error on retry, stock polling edge cases (singular, no label, qty zero, unknown billet) (8 new tests) - JS editor: comment node sanitization (1 new test) - JS tabs: missing panel, generated id, parent null, click no-panel (5 new tests) Code duplication fixes: - MeilisearchConsistencyCommand: extract diffAndReport() method (was duplicated 3x) - Email templates: extract _order_items_table.html.twig partial (shared by notification + cancelled) - SonarQube: exclude src/Entity/** from CPD (getters/setters duplication) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 11:44:13 +01:00
libretranslate-data: