Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- version: "3.8"
- services:
- web:
- #image: python:3.8.2-slim-buster
- container_name: djangosite-web
- restart: unless-stopped
- #ports:
- # - "127.0.0.1:8000:8000"
- working_dir: /src
- build:
- context: .
- dockerfile: ./docker/web/Dockerfile
- stdin_open: true
- tty: true
- command: python manage.py runserver 0.0.0.0:8000
- #command: /bin/bash
- #volumes:
- # - type: bind
- # source: .
- # target: /src
- depends_on:
- - psql
- networks:
- - backend
- env_file:
- - ./core/.env
- nginx:
- #image: nginx:1.17.10
- container_name: djangosite-nginx
- restart: unless-stopped
- #ports:
- # - "127.0.0.1:9000:80"
- build:
- context: .
- dockerfile: ./docker/nginx/Dockerfile
- volumes:
- - type: volume
- source: nginxlogs
- target: /var/log/nginx
- - type: bind
- source: ./public
- target: /public
- #- type: bind
- # source: ./docker/nginx/conf.d
- # target: /etc/nginx/conf.d/
- depends_on:
- - web
- networks:
- - backend
- psql:
- #image: postgres:12.2
- container_name: always
- restart: unless-stopped
- #ports:
- # - "127.0.0.1:5432:5432"
- build:
- context: .
- dockerfile: ./docker/postgres/Dockerfile
- volumes:
- - type: volume
- source: psqldata
- target: /var/lib/postgresql/data
- - type: volume
- source: psqlconf
- target: /etc/postgresql "/var/log/postgresql"
- - type: volume
- source: psqllogs
- target: /var/log/postgresql
- env_file:
- - ./core/.env
- expose:
- - "5432"
- networks:
- - backend
- networks:
- # Network for your internals, use it by default:
- backend:
- # Network for your proxy server and application to connect them,
- # do not use it for anything else!
- # proxynet:
- volumes:
- nginx-public:
- nginxlogs:
- psqldata:
- psqlconf:
- psqllogs:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement