Skip to content

Instantly share code, notes, and snippets.

@morenoh149
Created October 3, 2022 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morenoh149/3373eb11d48b4c969bde8dbb579f74ec to your computer and use it in GitHub Desktop.
Save morenoh149/3373eb11d48b4c969bde8dbb579f74ec to your computer and use it in GitHub Desktop.
docker cookiecutter local.yml
version: "3"
volumes:
local_postgres_data: {}
local_postgres_data_backups: {}
services:
django: &django
build:
context: .
dockerfile: ./compose/local/django/Dockerfile
image: myProject_local_django
depends_on:
- postgres
- mailhog
volumes:
- .:/app:delegated
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
ports:
- "8000:8000"
command: /start
postgres:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: myProject_production_postgres
volumes:
- local_postgres_data:/var/lib/postgresql/data:delegated
- local_postgres_data_backups:/backups:delegated
env_file:
- ./.envs/.local/.postgres
ports:
- "5432:5432"
mailhog:
image: mailhog/mailhog:v1.0.0
ports:
- "8025:8025"
- "1025:1025"
redis:
image: redis:5.0
ports:
- "6379:6379"
celeryworker:
<<: *django
image: myProject_local_celeryworker
depends_on:
- redis
- postgres
- mailhog
ports: []
command: /start-celeryworker
celerybeat:
<<: *django
image: myProject_local_celerybeat
depends_on:
- redis
- postgres
- mailhog
ports: []
command: /start-celerybeat
flower:
<<: *django
image: myProject_local_flower
ports:
- "5555:5555"
command: /start-flower
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment