forked from bcgov/gwells
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
173 lines (173 loc) · 5.34 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
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-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
minio-private:
build:
context: ./openshift/docker/minio/
hostname: minio
ports:
- "9001:9001"
volumes:
- /data
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio1234
entrypoint: /minio-entrypoint.sh
command: server --address :9001 /data
db:
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
tileserv:
hostname: tileserv
depends_on:
- db
image: pramsey/pg_tileserv:latest
environment:
DATABASE_URL: postgres://ftw_reader:test1@db:5432/gwells
ports:
- "7800:7800"
entrypoint: sh -c "sleep 10; /app/pg_tileserv"
frontend:
image: node:8.9.4
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/"
CHOKIDAR_USEPOLLING: "True"
API_TARGET: "${API_TARGET}"
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
consistency: cached
- /app/frontend/node_modules/
depends_on:
- backend
backend:
image: gwells/backend
hostname: backend
environment:
APP_CONTEXT_ROOT: gwells
CSRF_COOKIE_SECURE: "False"
CUSTOM_GDAL_GEOS: "False"
DATABASE_NAME: gwells
DATABASE_USER: gwells
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"
ENABLE_GOOGLE_ANALYTICS: "False"
GWELLS_SERVICE_HOST: db
GWELLS_SERVICE_PORT: 5432
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio1234
PYTHONUNBUFFERED: "1"
SESSION_COOKIE_SECURE: "False"
SSO_AUDIENCE: gwells-test
SSO_CLIENT: gwells-test
SSO_AUTH_HOST: https://test.oidc.gov.bc.ca/auth
SSO_IDP_HINT: "undefined"
SSO_PORT: 0
SSO_REALM: gwells
SSO_PUBKEY: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAh+5Hc4w/PKN04avW1LX/orSyXsJ7nJiEbErMyQqCvYAEKmQUeok7Yy+r6sVuJSyQQMCExk37NY3fUQOK92J83oC/9WGij7bvlWHew810edIisechoKpLuQbw63xlj/5ifQfJ977NM1n1RQgXF4hr4MDuhGbV+PAkQGdSPfufjEFleCwj8mvjUwTFnSwE9I+Rf78DVJzCHZbpFMq9skvrpCzeNsLNNoz+k1DENQ6MKnVnbUYskG+j5NZ3g+kxfkRf2G0tw2KisLYtxUSdfwutieT2Zxglk/kZeMWS7khXWzhwjvWf5a1qM5ebreVVYNhra7MjcrkXSh0v5IBcW+122wIDAQAB
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
command: /bin/bash -c "
sleep 3 &&
set -x &&
cd /app/backend &&
mkdir -p .pip &&
python3 -m pip install --upgrade pip &&
python3 -m pip install ptvsd &&
python3 -m pip install --cache-dir=.pip -r requirements.txt &&
python3 manage.py migrate --noinput &&
./load_fixtures.sh all &&
python3 manage.py createinitialrevisions &&
python3 manage.py collectstatic --noinput &&
python3 manage.py export --cleanup=1 --upload=1 &&
python3 manage.py runserver 0.0.0.0:8000"
volumes:
- type: bind
source: ./app/backend
target: /app/backend
consistency: cached
ports:
- "8000:8000"
- "3000:3000"
depends_on:
- db
volumes:
pgdata-volume: