Created
August 27, 2019 07:20
-
-
Save shmidtelson/3fcacc4c981e5cfec1a08775fdd6ffa4 to your computer and use it in GitHub Desktop.
DC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
djangoapp: | |
container_name: djangoapp_python | |
build: | |
context: . | |
dockerfile: docker/djangoapp/Dockerfile | |
command: gunicorn gaz.wsgi:application --bind 0.0.0.0:8000 | |
restart: always | |
expose: | |
- 8000 | |
volumes: | |
- ./app:/var/www/cabinet/app/ | |
links: | |
- database1:database1 | |
database1: | |
container_name: djangoapp_db | |
image: postgres:latest | |
environment: | |
- POSTGRES_USER=${POSTGRES_USER} | |
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | |
- POSTGRES_DB=${POSTGRES_DB} | |
ports: | |
- "${POSTGRES_PORT}:5432" | |
volumes: | |
- db-data:/var/lib/postgresql/data | |
nginx: | |
container_name: djangoapp_nginx | |
image: nginx:latest | |
restart: always | |
ports: | |
- 80:80 | |
volumes: | |
- ./nginx/conf.d:/etc/nginx/conf.d | |
- ./logs/nginx:/var/log/nginx | |
- ./app/static:/usr/share/nginx/html/static | |
volumes_from: | |
- djangoapp | |
links: | |
- djangoapp:djangoapp | |
volumes: | |
db-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment