procrustes / docker-compose.yml
QCDevs's picture
Add draft
19d59ff verified
version: '3.8'
services:
web:
build: .
command: gunicorn --config gunicorn_config.py app:app --reload
ports:
- "8000:8000"
volumes:
- .:/app
- /app/__pycache__
depends_on:
- redis
environment:
- FLASK_ENV=development
- FLASK_DEBUG=1
- REDIS_URL=redis://redis:6379/0
# build: .
# command: python -m flask run --host=0.0.0.0 --port=8000 --debug
# ports:
# - "3000:8000"
# volumes:
# - .:/app
# - /app/__pycache__
# environment:
# - FLASK_ENV=development
# - FLASK_DEBUG=1
# - REDIS_URL=redis://redis:6379/0
celery_worker:
build: .
command: celery -A app.celery worker --loglevel=info
volumes:
- .:/app
- /app/__pycache__
depends_on:
- redis
deploy:
replicas: 8
resources:
limits:
cpus: '1'
memory: 1G
celery_flower:
build: .
command: celery -A app.celery flower
ports:
- "5555:5555"
depends_on:
- redis
- celery_worker
redis:
image: redis:latest
ports:
- "6379:6379"
volumes:
- redis_data:/data
deploy:
resources:
limits:
cpus: '0.5'
memory: 256M
volumes:
redis_data: