Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name: <project_name>
- services:
- web:
- build: .
- container_name: <project_name>_app
- image: <project_name>_django
- command: /app/entrypoint.sh
- ports:
- - 8000:8000
- volumes:
- - .:/app # just so that local code is synced with our container
- depends_on:
- db:
- condition: service_healthy
- restart: true
- redis:
- condition: service_started
- env_file:
- - .env
- db:
- image: postgres
- container_name: postgres
- restart: unless-stopped
- volumes:
- - postgresdb_data:/var/lib/postgresql/data
- healthcheck:
- test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
- interval: 10s
- retries: 5
- start_period: 30s
- timeout: 10s
- env_file:
- - .env
- redis:
- image: redis:alpine
- container_name: redis
- volumes:
- - redis_data:/data
- celery:
- build: .
- container_name: celery
- restart: unless-stopped
- volumes:
- - .:/app
- depends_on:
- - db
- - redis
- - web
- command: celery -A <project_name> worker -E -l info
- env_file:
- - .env
- flower:
- build: .
- container_name: flower
- restart: unless-stopped
- command: 'celery -A <project_name> flower --basic_auth=admin:admin'
- ports:
- - 5555:5555
- volumes:
- - .:/app
- depends_on:
- - db
- - redis
- - web
- - celery
- env_file:
- - .env
- volumes:
- postgresdb_data:
- redis_data:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement