-
Notifications
You must be signed in to change notification settings - Fork 14
/
docker-compose-production.yml
84 lines (62 loc) · 1.74 KB
/
docker-compose-production.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# See https://github.com/studentenportal/deploy2020 for deployment docs.
version: '3.5'
services:
# nginx - reverse proxy
nginx:
image: studentenportal/nginx:latest
build:
context: .
dockerfile: deploy/production/nginx/Dockerfile
ports:
- 80:80
- 443:443
volumes:
# HOST_OR_NAME:CONTAINER
- "/home/studentenportal/media:/srv/www/studentenportal/media"
- "studentenportal-dehydrated:/etc/dehydrated"
- "studentenportal-static:/srv/www/studentenportal/static"
environment:
com.centurylinklabs.watchtower.enable: "false" # Must be built manually for now, since it's not published to Docker Hub
networks:
studentenportal-prod:
aliases:
- webserver
restart: unless-stopped
depends_on:
- studentenportal
# postgres - Database server
postgres:
image: postgres:12
volumes:
# HOST:CONTAINER
- "/home/studentenportal/postgres-data:/var/lib/postgresql/data"
env_file:
~/studentenportal.env
networks:
studentenportal-prod:
aliases:
- database
- postgres
restart: unless-stopped
# studentenportal - Application server with python
studentenportal:
image: studentenportal/web:latest
volumes:
# HOST_OR_NAME:CONTAINER
- "/home/studentenportal/media:/srv/www/studentenportal/media"
- "studentenportal-static:/srv/www/studentenportal/static"
env_file:
~/studentenportal.env
networks:
studentenportal-prod:
aliases:
- application
restart: unless-stopped
depends_on:
- postgres
networks:
studentenportal-prod:
driver: bridge
volumes:
studentenportal-static:
studentenportal-dehydrated: