leechard / docker-compose.yml
nenae18's picture
Deploy LeeChard
5d3c2a9 verified
Raw
History Blame Contribute Delete
1.4 kB
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: hair
POSTGRES_PASSWORD: hair
POSTGRES_DB: hair
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U hair"]
interval: 5s
timeout: 3s
retries: 10
redis:
image: redis:7-alpine
ports:
- "6379:6379"
# ์„ ํƒ: S3 ํ˜ธํ™˜ ์Šคํ† ๋ฆฌ์ง€. 1์ฐจ MVP๋Š” STORAGE_BACKEND=local ์ด๋ฉด ๋ถˆํ•„์š”.
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
ports:
- "9000:9000"
- "9001:9001"
volumes:
- miniodata:/data
api:
build: .
env_file: .env
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
ports:
- "8000:8000"
volumes:
- storage:/data/storage
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
worker:
build: .
env_file: .env
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
volumes:
- storage:/data/storage
command: celery -A app.workers.celery_app.celery_app worker --loglevel=info --concurrency=2
volumes:
pgdata:
miniodata:
storage: