0b0c59374b
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
99 lines
2.5 KiB
YAML
99 lines
2.5 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- internal
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- redis_data:/data
|
|
command: redis-server --save 60 1 --requirepass ${REDIS_PASSWORD}
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- internal
|
|
|
|
minio:
|
|
image: minio/minio:latest
|
|
restart: unless-stopped
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
|
volumes:
|
|
- minio_data:/data
|
|
command: server /data --console-address ":9001"
|
|
healthcheck:
|
|
test: ["CMD", "mc", "ready", "local"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- internal
|
|
|
|
migrate:
|
|
image: epicure-web:latest
|
|
command: ["node", "-e", "import('@epicure/db').then(m => m.migrate())"]
|
|
environment:
|
|
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: on-failure
|
|
networks:
|
|
- internal
|
|
|
|
web:
|
|
image: epicure-web:latest
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${APP_PORT:-3000}:3000"
|
|
environment:
|
|
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
|
|
REDIS_URL: redis://:${REDIS_PASSWORD}@redis:6379
|
|
STORAGE_ENDPOINT: http://minio:9000
|
|
STORAGE_ACCESS_KEY: ${MINIO_ROOT_USER}
|
|
STORAGE_SECRET_KEY: ${MINIO_ROOT_PASSWORD}
|
|
STORAGE_BUCKET: epicure-uploads
|
|
BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET}
|
|
BETTER_AUTH_URL: ${BETTER_AUTH_URL}
|
|
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
|
|
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
|
|
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
networks:
|
|
- internal
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
minio_data:
|
|
|
|
networks:
|
|
internal:
|
|
driver: bridge
|