Skip to content

Instantly share code, notes, and snippets.

@luisnaranjo733
Created May 19, 2017 17:21
Show Gist options
  • Save luisnaranjo733/b14ffb358b207c3f25c8a3b03f49cae7 to your computer and use it in GitHub Desktop.
Save luisnaranjo733/b14ffb358b207c3f25c8a3b03f49cae7 to your computer and use it in GitHub Desktop.
docker-compose.yml
version: '2'
services:
nginx:
image: nginx:latest
container_name: ng01
ports:
- "80:80"
volumes:
- ./src:/src
- ./config/nginx:/etc/nginx/conf.d
- /static:/static
depends_on:
- web
restart: always
web:
build:
context: .
dockerfile: docker/web.Dockerfile
container_name: dg01
command: bash -c "python manage.py makemigrations --no-input && python manage.py migrate --no-input && python manage.py collectstatic --no-input && gunicorn InForm.wsgi -b 0.0.0.0:80"
volumes:
- ./src:/src
- /static:/static
expose:
- "80"
ports:
- "8001:80"
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment