Skip to content

Commit

Permalink
Adjusting Docker and docker-compose structure to fit the new project.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-code committed Jul 4, 2018
1 parent 8742b12 commit 8f67631
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion compose/local/django/start.sh
Expand Up @@ -7,4 +7,4 @@ set -o xtrace


python manage.py migrate
python manage.py runserver_plus 0.0.0.0:8000
python manage.py runserver 0.0.0.0:8000
7 changes: 2 additions & 5 deletions local.yml
Expand Up @@ -13,9 +13,7 @@ services:
- postgres
volumes:
- .:/app
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
env_file: .env
ports:
- "8000:8000"
command: /start.sh
Expand All @@ -27,5 +25,4 @@ services:
volumes:
- postgres_data_local:/var/lib/postgresql/data
- postgres_backup_local:/backups
env_file:
- ./.envs/.local/.postgres
env_file: .env
21 changes: 13 additions & 8 deletions production.yml
Expand Up @@ -10,13 +10,21 @@ services:
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
env_file: .env
depends_on:
- postgres
- redis
command: daphne -b 0.0.0.0 -p 8000 config.asgi:channel_layer

worker:
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
command: python manage.py runworker
env_file: .env
depends_on:
- postgres
- redis
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: /gunicorn.sh

postgres:
build:
Expand All @@ -25,8 +33,6 @@ services:
volumes:
- postgres_data:/var/lib/postgresql/data
- postgres_backup:/backups
env_file:
- ./.envs/.production/.postgres

caddy:
build:
Expand All @@ -36,8 +42,7 @@ services:
- django
volumes:
- caddy:/root/.caddy
env_file:
- ./.envs/.production/.caddy
env_file: .env
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
Expand Down

0 comments on commit 8f67631

Please sign in to comment.