-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
55 lines (50 loc) · 1.21 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: '3'
services:
db:
image: postgres:9.6
container_name: dddemo-postgres
ports:
- "5432"
networks:
- jaz
app:
build:
context: .
dockerfile: Dockerfile
container_name: dddemo-app
command: /site/docker-utils/app-start.sh
volumes:
- .:/site/proj/
- static-volume:/site/htdocs/static/
ports:
- "8000"
environment:
- DATABASE_URL=postgres://postgres@db/postgres
- SITE_DIR=/site/
- PROJECT_NAME=dddemo
- DJANGO_DEBUG=True
networks:
- jaz
web:
image: nginx:1.11
container_name: dddemo-web
ports:
- "80:80"
- "443:443"
depends_on:
- app
volumes:
- ./docker-utils/nginx/default.template.conf:/root/default.template.conf
- ./docker-utils/ssl/:/site/ssl/
- static-volume:/static
command: /bin/bash -c "envsubst '$$NGINX_HTTP_PORT $$NGINX_HTTPS_PORT' < /root/default.template.conf > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
environment:
- NGINX_HOST=foobar.com
- NGINX_HTTP_PORT=80
- NGINX_HTTPS_PORT=443
networks:
- jaz
networks:
jaz:
volumes:
static-volume: