119 lines
2.5 KiB
YAML
119 lines
2.5 KiB
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/app/Dockerfile
|
|
user: "1000:1000"
|
|
environment:
|
|
HOME: /tmp
|
|
volumes:
|
|
- .:/var/www
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
env_file: .env
|
|
|
|
caddy:
|
|
image: caddy:2-alpine
|
|
volumes:
|
|
- ./docker/caddy/Caddyfile:/etc/caddy/Caddyfile
|
|
- .:/var/www
|
|
- caddy_data:/data
|
|
depends_on:
|
|
- app
|
|
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
env_file: .env
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
command: redis-server --requirepass ${REDIS_PASSWORD}
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
worker-ai:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/app/Dockerfile
|
|
user: "1000:1000"
|
|
environment:
|
|
HOME: /tmp
|
|
command: php bin/console messenger:consume ai_pipeline --time-limit=3600 --memory-limit=256M
|
|
volumes:
|
|
- .:/var/www
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
env_file: .env
|
|
restart: unless-stopped
|
|
|
|
worker-orders:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/app/Dockerfile
|
|
user: "1000:1000"
|
|
environment:
|
|
HOME: /tmp
|
|
command: php bin/console messenger:consume orders --time-limit=3600 --memory-limit=256M
|
|
volumes:
|
|
- .:/var/www
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
env_file: .env
|
|
restart: unless-stopped
|
|
|
|
worker-channel:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/app/Dockerfile
|
|
user: "1000:1000"
|
|
environment:
|
|
HOME: /tmp
|
|
command: php bin/console messenger:consume channel_sync --time-limit=3600 --memory-limit=256M
|
|
volumes:
|
|
- .:/var/www
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
env_file: .env
|
|
restart: unless-stopped
|
|
|
|
cron:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/app/Dockerfile
|
|
user: "1000:1000"
|
|
environment:
|
|
HOME: /tmp
|
|
command: >
|
|
sh -c "while true; do
|
|
php bin/console app:logs:rotate;
|
|
sleep 86400;
|
|
done"
|
|
volumes:
|
|
- .:/var/www
|
|
depends_on:
|
|
- postgres
|
|
env_file: .env
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
caddy_data:
|