This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
176 lines (166 loc) · 4.16 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
version: "3.4"
services:
minio:
image: bitnami/minio:2019.10.12-r3
env_file:
- .env
ports:
- ${MINIO_SERVER_PORT_NUMBER}
networks:
- app-tier
volumes:
- /data/minio:/data
restart: unless-stopped
redis:
image: bitnami/redis:5.0
env_file:
- .env
ports:
- ${REDIS_PORT}
networks:
- app-tier
volumes:
- /data/redis:/bitnami/redis/data
restart: unless-stopped
redis-commander:
image: rediscommander/redis-commander
env_file:
- .env
environment:
- REDIS_PORT=${REDIS_PORT}
- REDIS_HOST=redis
ports:
- ${REDIS_COMMANDER_PORT}
networks:
- app-tier
depends_on:
- redis
restart: unless-stopped
postgresql:
image: bitnami/postgresql:11
env_file:
- .env
ports:
- ${POSTGRESQL_PORT}
networks:
- app-tier
volumes:
- /data/postgresql:/bitnami/postgresql
- /data/wal-logs:/bitnami/wal-logs
- /data/db-backups:/db-backups
- ./scripts/ipa-import-local.sh:/ipa-import-local.sh
- ./scripts/backup-db.sh:/backup-db.sh
- ./scripts/cleanup-hasura-events.sh:/cleanup-hasura-events.sh
restart: unless-stopped
hasura:
image: hasura/graphql-engine:v1.0.0-beta.9
labels:
- traefik.enable=true
- traefik.frontend.rule=Host:${HASURA_HOST}
- traefik.port=${HASURA_PORT}
- traefik.docker.network=app-tier
env_file:
- .env
ports:
- ${HASURA_PORT}
networks:
- app-tier
depends_on:
- postgresql
restart: unless-stopped
agid-forms-backend:
image: agid-forms-backend:local
env_file:
- .env
build:
context: .
args:
- HASURA_GRAPHQL_ENDPOINT
- HASURA_GRAPHQL_ADMIN_SECRET
labels:
- traefik.enable=true
- traefik.frontend.rule=Host:${BACKEND_HOST}
- traefik.port=${BACKEND_PORT}
- traefik.docker.network=app-tier
ports:
- ${BACKEND_PORT}
command: ["yarn", "start"]
networks:
- app-tier
depends_on:
- hasura
- redis
# to get graphql endpoint with https
- traefik
restart: unless-stopped
agid-forms-backend-processor:
image: agid-forms-backend:local
env_file:
- .env
command: ["yarn", "run-processor"]
networks:
- app-tier
depends_on:
- agid-forms-backend
restart: unless-stopped
agid-forms-backend-uploads:
image: agid-forms-backend:local
env_file:
- .env
labels:
- traefik.enable=true
- traefik.frontend.rule=Host:${UPLOAD_SERVER_HOST}
- traefik.port=${UPLOAD_SERVER_PORT}
- traefik.docker.network=app-tier
ports:
- ${UPLOAD_SERVER_PORT}
command: ["yarn", "run-uploads"]
networks:
- app-tier
depends_on:
- agid-forms-backend
restart: unless-stopped
traefik:
image: traefik:v1.7
command: |-
--api
--api.dashboard=true
--debug=false
--loglevel=ERROR
--retry
--defaultentrypoints=http,https
--entryPoints='Name:traefik Address::${TRAEFIK_DASHBOARD_PORT} Auth.Basic.Users:${TRAEFIK_DASHBOARD_USER}:${TRAEFIK_DASHBOARD_PASSWORD}'
--entryPoints='Name:http Address::80 Redirect.EntryPoint:https'
--entryPoints='Name:https Address::443 TLS'
--docker
--docker.endpoint="unix:///var/run/docker.sock"
--docker.domain=${TRAEFIK_DOMAIN}
--docker.watch=true
--docker.exposedbydefault=false
--acme
--acme.email=${TRAEFIK_ACME_EMAIL}
--acme.entrypoint=https
--acme.httpchallenge.entrypoint=http
--acme.storage=acme.json
--acme.onhostrule=true
labels:
- traefik.docker.network=app-tier
- traefik.frontend.headers.STSPreload=true
- traefik.frontend.headers.STSSeconds=31536000
env_file:
- .env
ports:
- 80:80
- 443:443
- ${TRAEFIK_DASHBOARD_PORT}:${TRAEFIK_DASHBOARD_PORT}
networks:
- app-tier
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /data/traefik/acme.json:/acme.json
restart: unless-stopped
networks:
app-tier:
driver: bridge
driver_opts:
com.docker.network.driver.mtu: 1450