forked from compdemocracy/polis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
130 lines (115 loc) · 2.74 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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# before running docker-compose up for the first time,
# either do a pull:
# docker-compose pull
# or do a build:
# GIT_HASH $(git rev-parse --short HEAD) docker-compose up --detach
# subsequently you should only need to run:
# docker-compose up --detach
# force a full re-build with no cache from previous builds:
# docker-compose build --build-arg GIT_HASH $(git rev-parse --short HEAD) --parallel --no-cache
# to stop:
# docker-compose down
version: "3.1"
services:
server:
container_name: polis-server
env_file: ./server/docker-dev.env
image: compdem/polis-server:${TAG}
build:
context: ./server
dockerfile: Dockerfile
depends_on:
- "postgres"
- "file-server"
networks:
- "polis-net"
ports:
- "5000:5000"
- "9229:9229"
math:
container_name: polis-math
env_file: ./math/docker-dev.env
image: compdem/polis-math:${TAG}
depends_on:
- "postgres"
build:
context: ./math
networks:
- "polis-net"
postgres:
container_name: polis-postgres
env_file: ./server/docker-db-dev.env
image: compdem/polis-postgres:${TAG}
restart: always
build:
context: ./server
dockerfile: Dockerfile-db
networks:
- "polis-net"
volumes:
- "backups:/backups"
- "postgres:/var/lib/postgresql/data"
nginx-proxy:
container_name: polis-nginx-proxy
image: compdem/polis-nginx-proxy:${TAG}
build:
context: ./file-server
dockerfile: nginx.Dockerfile
environment:
- TAG
depends_on:
- "server"
networks:
- "polis-net"
ports:
- "80:80"
- "443:443"
file-server:
container_name: polis-file-server
image: compdem/polis-file-server:${TAG}
build:
context: ./file-server
dockerfile: Dockerfile
depends_on:
- "client-participation"
- "client-admin"
- "client-report"
networks:
- "polis-net"
ports:
- "8080:8080"
client-participation:
container_name: polis-client-participation
image: compdem/polis-client-participation:${TAG}
build:
context: ./client-participation
args:
GIT_HASH: "${GIT_HASH}"
client-admin:
container_name: polis-client-admin
image: compdem/polis-client-admin:${TAG}
build:
context: ./client-admin
args:
GIT_HASH: "${GIT_HASH}"
client-report:
container_name: polis-client-report
image: compdem/polis-client-report:${TAG}
build:
context: ./client-report
args:
GIT_HASH: "${GIT_HASH}"
maildev:
image: maildev/maildev:1.1.0
networks:
- "polis-net"
ports:
# User interface
- "1080:80"
# SMTP port
- "25:25"
networks:
polis-net:
volumes:
backups:
postgres: