forked from bcgov/gwells
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
242 lines (238 loc) · 8.86 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
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: ./openshift/docker/minio/
hostname: minio
ports:
- "9000:9000"
volumes:
- /data
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio1234
MINIO_DATA_DIR: /data
entrypoint: /minio-entrypoint.sh
command: server /data
networks:
- gwells-network
#############################################################################################
### Minio-Priv ###
#############################################################################################
minio-private:
build:
context: ./openshift/docker/minio/
hostname: minio
ports:
- "9001:9001"
volumes:
- /data
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio1234
MINIO_DATA_DIR: /data
entrypoint: /minio-entrypoint.sh
command: server --address :9001 /data
networks:
- gwells-network
#############################################################################################
### 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-volume:/pgdata:z
- type: bind
source: ./app/database/scripts/local_dev/setup.sql
target: /pgconf/setup.sql
consistency: cached
healthcheck:
test: ["CMD-SHELL", "/usr/pgsql-12/bin/pg_isready", "-d", "gwells"]
interval: 20s
timeout: 30s
retries: 5
start_period: 120s
networks:
- gwells-network
#############################################################################################
### 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"
networks:
- gwells-network
#############################################################################################
### Frontend ###
#############################################################################################
frontend:
image: node:14.21.3
hostname: frontend
working_dir: /app/frontend
environment:
DEBUG: "True"
VUE_APP_AXIOS_BASE_URL: /api/
VUE_APP_VECTOR_TILE_BASE_URL: "/tiles/"
VECTOR_TILE_SERVER: "http://tileserv:7800/"
API_TARGET: "${API_TARGET:-http://backend:8000/}"
command: /bin/bash -c "
set -x &&
cd /app/frontend &&
npm install &&
npm run serve"
ports:
- "8080:8080"
volumes:
- type: bind
source: ./app/frontend
target: /app/frontend
- /app/frontend/node_modules/
depends_on:
- backend
networks:
- gwells-network
#############################################################################################
### Backend ###
#############################################################################################
backend:
platform: linux/x86_64
build:
context: ./openshift/docker/backend
dockerfile: Dockerfile.dev
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
command: ./scripts/backend-command-script.sh
volumes:
- type: bind
source: ./app/backend
target: /app/backend
consistency: cached
- type: bind
source: ./app/scripts/backend-command-script.sh
target: /app/scripts/backend-command-script.sh
consistency: cached
ports:
- "8000:8000"
- "3000:3000"
depends_on:
db:
condition: service_healthy
networks:
- gwells-network
#############################################################################################
### Volumes ###
#############################################################################################
pgadmin:
container_name: gwells-pgadmin
image: dpage/pgadmin4
ports:
- 5050:80
environment:
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_DEFAULT_EMAIL: [email protected]
networks:
- gwells-network
#############################################################################################
### Volumes ###
#############################################################################################
volumes:
pgdata-volume:
#############################################################################################
### Network ###
#############################################################################################
networks:
gwells-network:
driver: "bridge"