초기 커밋
This commit is contained in:
69
docker-compose.prod.yml
Normal file
69
docker-compose.prod.yml
Normal file
@@ -0,0 +1,69 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8000:8000"
|
||||
env_file: .env
|
||||
depends_on:
|
||||
- redis
|
||||
- mosquitto
|
||||
restart: always
|
||||
command: uvicorn app.asgi:app --host 0.0.0.0 --port 8000 --workers 4
|
||||
|
||||
worker:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.worker
|
||||
env_file: .env
|
||||
depends_on:
|
||||
- redis
|
||||
restart: always
|
||||
command: celery -A app.tasks.celery_app worker --loglevel=warning --concurrency=4
|
||||
deploy:
|
||||
replicas: 2
|
||||
|
||||
beat:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.worker
|
||||
env_file: .env
|
||||
depends_on:
|
||||
- redis
|
||||
restart: always
|
||||
command: celery -A app.tasks.celery_app beat --loglevel=warning
|
||||
|
||||
flower:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.worker
|
||||
ports:
|
||||
- "5555:5555"
|
||||
env_file: .env
|
||||
depends_on:
|
||||
- redis
|
||||
- worker
|
||||
restart: always
|
||||
command: celery -A app.tasks.celery_app flower --port=5555 --basic_auth=${FLOWER_USER:-admin}:${FLOWER_PASSWORD:-changeme}
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
restart: always
|
||||
|
||||
mosquitto:
|
||||
image: eclipse-mosquitto:2
|
||||
ports:
|
||||
- "1883:1883"
|
||||
volumes:
|
||||
- ./docker/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
|
||||
- mosquitto_data:/mosquitto/data
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
redis_data:
|
||||
mosquitto_data:
|
||||
Reference in New Issue
Block a user