forked from compdemocracy/polis
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
127 lines (112 loc) · 2.64 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
# 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: polisdemo/server:dev
build:
context: ./server
dockerfile: Dockerfile
depends_on:
- "postgres"
- "file-server"
networks:
- "polis-dev"
ports:
- "5000:5000"
math:
container_name: polis-math
env_file: ./math/docker-dev.env
image: polisdemo/math:dev
depends_on:
- "postgres"
build:
context: ./math
networks:
- "polis-dev"
postgres:
container_name: polis-postgres
env_file: ./server/docker-db-dev.env
image: polisdemo/postgres:dev
restart: always
build:
context: ./server
dockerfile: Dockerfile-db
networks:
- "polis-dev"
volumes:
- "backups:/backups"
- "postgres:/var/lib/postgresql/data"
nginx-proxy:
container_name: polis-nginx-proxy
image: polisdemo/nginx-proxy:dev
build:
context: ./file-server
dockerfile: nginx.Dockerfile
depends_on:
- "server"
networks:
- "polis-dev"
ports:
- "80:80"
- "443:443"
file-server:
container_name: polis-file-server
image: polisdemo/file-server:dev
build:
context: ./file-server
dockerfile: Dockerfile
depends_on:
- "client-participation"
- "client-admin"
- "client-report"
networks:
- "polis-dev"
ports:
- "8080:8080"
client-participation:
container_name: polis-client-participation
image: polisdemo/client-participation:dev
build:
context: ./client-participation
args:
GIT_HASH: "${GIT_HASH}"
client-admin:
container_name: polis-client-admin
image: polisdemo/client-admin:dev
build:
context: ./client-admin
args:
GIT_HASH: "${GIT_HASH}"
client-report:
container_name: polis-client-report
image: polisdemo/client-report:dev
build:
context: ./client-report
args:
GIT_HASH: "${GIT_HASH}"
maildev:
image: maildev/maildev:1.1.0
networks:
- "polis-dev"
ports:
# User interface
- "1080:80"
# SMTP port
- "25:25"
networks:
polis-dev:
volumes:
backups:
postgres: