forked from SakshamHaryana-SE/enketo
-
Notifications
You must be signed in to change notification settings - Fork 28
/
docker-compose.yml
231 lines (214 loc) · 5.92 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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
version: '3'
services:
db:
image: postgres:12.9
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
networks:
- db_net
restart: unless-stopped
volumes:
- db_data:/var/lib/postgresql/data
search:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.0
environment:
cluster.name: fusionauth
bootstrap.memory_lock: "true"
discovery.type: single-node
ES_JAVA_OPTS: ${ES_JAVA_OPTS}
healthcheck:
test:
[
"CMD",
"curl",
"--fail",
"--write-out",
"'HTTP %{http_code}'",
"--silent",
"--output",
"/dev/null",
"http://localhost:9200/"
]
interval: 5s
timeout: 5s
retries: 5
networks:
- search_net
restart: unless-stopped
volumes:
- search_data:/usr/share/elasticsearch/data
fusionauth:
image: fusionauth/fusionauth-app:latest
depends_on:
db:
condition: service_healthy
search:
condition: service_healthy
environment:
DATABASE_URL: jdbc:postgresql://db:5432/fusionauth
DATABASE_ROOT_USERNAME: ${POSTGRES_USER}
DATABASE_ROOT_PASSWORD: ${POSTGRES_PASSWORD}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
FUSIONAUTH_APP_MEMORY: ${FUSIONAUTH_APP_MEMORY}
FUSIONAUTH_APP_RUNTIME_MODE: development
FUSIONAUTH_APP_URL: http://fusionauth:9011
SEARCH_SERVERS: http://search:9200
SEARCH_TYPE: elasticsearch
FUSIONAUTH_APP_KICKSTART_FILE: /usr/local/fusionauth/kickstarts/kickstart.json
env_file:
- ./fusionauth.env
volumes:
- fa-config:/usr/local/fusionauth/config
- ./kickstart:/usr/local/fusionauth/kickstarts
networks:
- db_net
- search_net
- default
restart: unless-stopped
ports:
- 9011:9011
redis_main:
image: redis:5
volumes:
- ./redis_main_data/:/data/
restart: unless-stopped
redis_cache:
image: redis:5
volumes:
- ./redis_cache_data/:/data/
restart: unless-stopped
tsdb:
container_name: tsdb
image: timescale/timescaledb:2.0.0-pg12
restart: always
ports:
- "5432:5432"
volumes:
- ./pgdata:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${TSDB_POSTGRES_USER}
POSTGRES_PASSWORD: ${TSDB_POSTGRES_PASSWORD}
gql:
image: hasura/graphql-engine:latest
ports:
- "8080:8080"
volumes:
- ./data/migrations:/hasura-migrations
- ./data/metadata:/hasura-metadata
depends_on:
- tsdb
- fusionauth
restart: always
environment:
- HASURA_GRAPHQL_DATABASE_URL=${HASURA_GRAPHQL_DATABASE_URL}
- HASURA_GRAPHQL_ENABLE_CONSOLE=true # set to "false" to disable console
- HASURA_GRAPHQL_DEV_MODE=true
- HASURA_GRAPHQL_ENABLED_LOG_TYPES=startup,http-log,webhook-log,websocket-log,query-log
- HASURA_GRAPHQL_MIGRATIONS_DISABLE_TRANSACTION=true
- HASURA_GRAPHQL_CONSOLE_ASSETS_DIR=/srv/console-assets
- HASURA_GRAPHQL_ADMIN_SECRET=${HASURA_GRAPHQL_ADMIN_SECRET}
- HASURA_GRAPHQL_JWT_SECRET=${HASURA_GRAPHQL_JWT_SECRET}
minio:
image: minio/minio
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-data:/data
environment:
MINIO_ROOT_USER: ${MINIO_USERNAME}
MINIO_ROOT_PASSWORD: ${MINIO_PASSWORD}
command: server --console-address ":9001" /data
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio http://minio:9000 ${MINIO_USERNAME} ${MINIO_PASSWORD};
/usr/bin/mc rm -r --force myminio/${MINIO_BUCKETNAME};
/usr/bin/mc mb myminio/${MINIO_BUCKETNAME};
/usr/bin/mc anonymous set public myminio/${MINIO_BUCKETNAME};
exit 0;
"
enketo-express:
image: enketo-express
build:
dockerfile: enketo-express/Dockerfile
context: packages
depends_on:
- redis_main
- redis_cache
ports:
- 8065:8065
environment:
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
LESS_SECURE_ENCRYPTION_KEY: ${LESS_SECURE_ENCRYPTION_KEY}
REDIS_MAIN_HOST: redis_main
REDIS_MAIN_PORT: 6379
REDIS_CACHE_HOST: redis_cache
REDIS_CACHE_PORT: 6379
FORM_MANAGER_BASE_URI: ${FORM_MANAGER_BASE_URI}
fm-cache:
image: redis:7
volumes:
- ./fm_redis_data/:/data/
restart: unless-stopped
form-manager:
image: form-manager
build: packages/form-manager
depends_on:
- fm-cache
- minio
- createbuckets
ports:
- 3006:3006
environment:
MINIO_USERNAME: ${MINIO_USERNAME}
MINIO_ENDPOINT: ${MINIO_ENDPOINT}
MINIO_PORT: ${MINIO_PORT}
MINIO_URL: ${MINIO_URL}
MINIO_PASSWORD: ${MINIO_PASSWORD}
MINIO_BUCKETNAME: ${MINIO_BUCKETNAME}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
FORM_MANAGER_URL: ${FORM_MANAGER_URL}
MINIO_USE_SSL: ${MINIO_USE_SSL}
wrapper:
image: wrapper
build:
context: apps/wrapper
# env vars to be passed at build time as it will build a static file
args:
NEXT_PUBLIC_ENKETO_URL: ${NEXT_PUBLIC_ENKETO_URL}
NEXT_PUBLIC_FORM_MANAGER_URL: ${NEXT_PUBLIC_FORM_MANAGER_URL}
NEXT_PUBLIC_HASURA_URL: ${NEXT_PUBLIC_HASURA_URL}
NEXT_PUBLIC_USER_SERVICE_URL: ${NEXT_PUBLIC_USER_SERVICE_URL}
NEXT_PUBLIC_APPLICATION_ID: ${NEXT_PUBLIC_APPLICATION_ID}
ports:
- 3000:3000
centro:
image: centro
build: packages/centro
ports:
- 3560:3560
networks:
db_net:
driver: bridge
search_net:
driver: bridge
default:
volumes:
db_data:
search_data:
minio-data:
fa-config:
minio_storage: {}