generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
277 lines (267 loc) · 9.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
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# version: '3.7'
# NOTE For Red Hat or other images on the internal registry please login as follows:
# 1. Be logged into the BC Gov OpenShift Console
# https://console.pathfinder.gov.bc.ca:8443/console/catalog)
# 2. Be logged into the BC Gov OpenShift Image Registry via
# docker login -u <github> -p `oc whoami -t` docker-registry.pathfinder.gov.bc.ca
#
# For example:
# docker login -u garywong-bc -p `oc whoami -t` docker-registry.pathfinder.gov.bc.ca
services:
#############################################################################################
### Minio-Pub ###
#############################################################################################
minio-public:
build:
context: ./minio/
hostname: minio
ports:
- "9000:9000"
volumes:
- type: tmpfs
target: /tmp/data:/tmp/data
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio1234
MINIO_DATA_DIR: /tmp/data
entrypoint: /minio-entrypoint.sh
command: server /tmp/data
#############################################################################################
### Minio-Priv ###
#############################################################################################
# minio-private:
# build:
# context: ./minio/
# hostname: minio
# ports:
# - "9001:9001"
# volumes:
# - type: tmpfs
# target: /tmp/data:/tmp/data
# environment:
# MINIO_ACCESS_KEY: minio
# MINIO_SECRET_KEY: minio1234
# MINIO_DATA_DIR: /tmp/data
# entrypoint: /minio-entrypoint.sh
# command: server --address :9001 /tmp/data
#############################################################################################
### CrunchyDB ###
#############################################################################################
db:
platform: linux/x86_64
image: crunchydata/crunchy-postgres-gis:centos7-12.2-4.2.2
hostname: db
environment:
PG_USER: gwells
PG_PASSWORD: test1
PG_DATABASE: gwells
PG_MODE: primary
PG_PRIMARY_USER: primaryuser
PG_PRIMARY_PASSWORD: test_primary_password
PG_ROOT_PASSWORD: test_root_password
PG_PRIMARY_PORT: 5432
TEMP_BUFFERS: 9MB
MAX_CONNECTIONS: 101
SHARED_BUFFERS: 128MB
MAX_WAL_SENDERS: 7
WORK_MEM: 5MB
PG_PRIMARY_HOST: db
PGHOST: /tmp
TILESERVER_USER: ftw_reader
TILESERVER_PASSWORD: test1
ports:
- "5432:5432"
volumes:
- /pgdata
- ./database/scripts/local_dev/setup.sql:/pgconf/setup.sql
healthcheck:
test: ["CMD-SHELL", "/usr/pgsql-12/bin/pg_isready", "-d", "gwells"]
interval: 20s
timeout: 30s
retries: 5
start_period: 120s
# db:
# container_name: db
# image: postgis/postgis:12-master
# environment:
# POSTGRES_USER: gwells
# POSTGRES_PASSWORD: test1
# POSTGRES_DATABASE: gwells
# TILESERVER_USER: ftw_reader
# TILESERVER_PASSWORD: test1
# volumes:
# # - /pgdata
# - ./database/scripts/local_dev/setup.sql:/docker-entrypoint-initdb.d/init.sql
# ports: ["5432:5432"]
# healthcheck:
# test: pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DATABASE}
# interval: 1s
# timeout: 3s
# retries: 10
# start_period: 5s
# test: psql -q -U $${POSTGRES_USER} -d $${POSTGRES_DB} -c 'SELECT 1'
# test: pg_isready -d $${{POSTGRES_DB}} -U $${{POSTGRES_USER}}
# test: ["CMD-SHELL", "/usr/pgsql-12/bin/pg_isready", "-d", "gwells"]
#############################################################################################
### Tileserv ###
#############################################################################################
tileserv:
hostname: tileserv
depends_on:
- db
platform: linux/x86_64
image: pramsey/pg_tileserv:20231005
# env_file:
# - path: ./.env.test
# required: false
environment:
DATABASE_URL: "postgres://ftw_reader:${DATABASE_PASSWORD:-test1}@${GWELLS_SERVICE_HOST:-db}:${GWELLS_SERVICE_PORT:-5432}/gwells"
ports:
- "7800:7800"
entrypoint: sh -c "sleep 10; /app/pg_tileserv"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7800"]
#############################################################################################
### Frontend ###
#############################################################################################
frontend:
image: node:14.21.3
hostname: frontend
# working_dir: /app/frontend
# build:
# context: ./frontend
# dockerfile: Dockerfile
environment:
DEBUG: "true"
VUE_APP_AXIOS_BASE_URL: "http://backend:8000/gwells/api/v2/"
VUE_APP_VECTOR_TILE_BASE_URL: "/tiles/"
VECTOR_TILE_SERVER: "http://tileserv:7800/"
API_TARGET: "http://backend:8000/"
BACKEND_URL: "http://backend:8000"
LOG_LEVEL: "info"
command: /bin/bash -c "cd /frontend && npm install && npm run serve"
ports:
- "3000:8080"
volumes:
- ./frontend:/frontend
- /frontend/node_modules/
depends_on:
backend:
condition: service_started
tileserv:
condition: service_started
caddy:
container_name: caddy
profiles: ["caddy"]
build: ./frontend
environment:
NODE_ENV: development
PORT: 3000
BACKEND_URL: http://backend:8000
LOG_LEVEL: info
# VUE_APP_AXIOS_BASE_URL: "http://backend:8000/gwells/api/v2/"
# VUE_APP_VECTOR_TILE_BASE_URL: "/tiles/"
# VECTOR_TILE_SERVER: "http://tileserv:7800/"
# API_TARGET: "http://backend:8000/"
# LOG_LEVEL: "info"
ports: ["3005:3000"]
volumes: ["./frontend/Caddyfile:/etc/caddy/Caddyfile"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3005"]
interval: 5s
timeout: 3s
retries: 10
start_period: 20s
depends_on:
backend:
condition: service_healthy
#############################################################################################
### Backend ###
#############################################################################################
backend:
platform: linux/x86_64
working_dir: /backend
build:
context: ./backend
dockerfile: Dockerfile
hostname: backend
# env_file:
# - path: ./.env.test
# required: false
environment:
ENVIRONMENT: "${ENVIRONMENT:-local}"
APP_CONTEXT_ROOT: gwells
CSRF_COOKIE_SECURE: "False"
CUSTOM_GDAL_GEOS: "False"
DATABASE_NAME: gwells
DATABASE_USER: "${DATABASE_USER:-gwells}"
DATABASE_PASSWORD: "${DATABASE_PASSWORD:-test1}"
DATABASE_SERVICE_NAME: gwells
DJANGO_ADMIN_URL: admin
DJANGO_DEBUG: "true"
DJANGO_SECRET_KEY: secret
ENABLE_ADDITIONAL_DOCUMENTS: "true"
ENABLE_AQUIFERS_SEARCH: "true"
GWELLS_SERVICE_HOST: "${GWELLS_SERVICE_HOST:-db}"
GWELLS_SERVICE_PORT: "${GWELLS_SERVICE_PORT:-5432}"
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio1234
PYTHONUNBUFFERED: "1"
SESSION_COOKIE_SECURE: "False"
SSO_AUDIENCE: gwells-4121
SSO_CLIENT: gwells-4121
SSO_TEST_AUDIENCE: gwells-api-tests-4820
SSO_TEST_CLIENT: gwells-api-tests-4820
SSO_AUTH_HOST: https://test.loginproxy.gov.bc.ca/auth
SSO_IDP_HINT: "undefined"
SSO_PORT: 0
SSO_REALM: standard
SSO_PUBKEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiFdv9GA83uHuy8Eu9yiZHGGF9j6J8t7FkbcpaN81GDjwbjsIJ0OJO9dKRAx6BAtTC4ubJTBJMPvQER5ikOhIeBi4o25fg61jpgsU6oRZHkCXc9gX6mrjMjbsPaf3/bjjYxP5jicBDJQeD1oRa24+tiGggoQ7k6gDEN+cRYqqNpzC/GQbkUPk8YsgroncEgu8ChMh/3ERsLV2zorchMANUq76max16mHrhtWIQxrb/STpSt4JuSlUzzBV/dcXjJe5gywZHe0jAutFhNqjHzHdgyaC4RAd3eYQo+Kl/JOgy2AZrnx+CiPmvOJKe9tAW4k4H087ng8aVE40v4HW/FEbnwIDAQAB
S3_HOST: minio-public:9000
S3_PRIVATE_HOST: minio-private:9001
S3_PRIVATE_BUCKET: gwells
S3_PRIVATE_ROOT_BUCKET: gwells
S3_PRIVATE_WELL_BUCKET: well-docs
S3_PRIVATE_AQUIFER_BUCKET: aquifer-docs
S3_PRIVATE_REGISTRANT_BUCKET: driller-docs
S3_PUBLIC_ACCESS_KEY: minio
S3_PUBLIC_SECRET_KEY: minio1234
S3_AQUIFER_BUCKET: aquifer-docs
S3_REGISTRANT_BUCKET: driller-docs
S3_ROOT_BUCKET: gwells
S3_WELL_BUCKET: well-docs
S3_WELL_EXPORT_BUCKET: gwells
S3_USE_SECURE: 0
EMAIL_NOTIFICATION_RECIPIENT: [email protected]
GEOCODER_ADDRESS_API_BASE: https://geocoder.api.gov.bc.ca/addresses.json?
LOCAL: "true"
LOAD_FIXTURES: "true"
volumes:
- ./backend:/backend
healthcheck:
test: timeout 3s bash -c 'true > /dev/tcp/127.0.0.1/8000'
interval: 5s
timeout: 3s
retries: 10
start_period: 20s
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
minio-public:
condition: service_started
#############################################################################################
### PGAdmin ###
#############################################################################################
pgadmin:
container_name: gwells-pgadmin
profiles: ["pgadmin"]
image: dpage/pgadmin4
ports:
- 5050:80
environment:
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_DEFAULT_EMAIL: [email protected]
depends_on:
- db