Skip to content

Instantly share code, notes, and snippets.

@morenoh149
Last active October 30, 2024 23:16
Show Gist options
  • Save morenoh149/aedb3b42dd6f05f0caaac217ec5ab3e1 to your computer and use it in GitHub Desktop.
Save morenoh149/aedb3b42dd6f05f0caaac217ec5ab3e1 to your computer and use it in GitHub Desktop.
This focuses on the webserver and the migrate task. It is based on https://github.com/cookiecutter/cookiecutter-django
django: &django
build:
context: .
dockerfile: ./Dockerfile.dev
image: local_django
container_name:local_django
depends_on:
- django_migrate
- db
volumes:
- .:/app:z
ports:
- '8000:8000'
django_migrate:
<<: *django
container_name: local_django_migrate
command: python manage.py migrate --noinput
depends_on:
- db
ports: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment