forked from bcgov/PSP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
176 lines (165 loc) · 3.96 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.5"
include:
- tools/mayan-edms/docker-compose.yml
services:
####################### Database #######################
database:
profiles:
- all
- psp
environment:
- TARGET_SPRINT
- SEED
restart: on-failure:1
container_name: psp-db
build:
context: source/database/mssql/scripts/dbscripts
env_file:
- source/database/mssql/.env
ports:
- ${DATABASE_PORT:-5433}:1433
volumes:
- api-db-data:/var/opt/data
networks:
- psp
## Emulates the Openshift database job image for testing purposes
rhel8-database:
profiles:
- debug
environment:
- TARGET_SPRINT
- SEED
restart: on-failure:1
container_name: psp-rhel-db
build:
context: source/database/mssql
dockerfile: ./scripts/dbscripts/rhel8.dockerfile
env_file:
- source/database/mssql/.env
ports:
- 6433:1433
volumes:
- api-db-rhel-data:/var/opt/data
networks:
- psp
####################### Backend #######################
backend:
profiles:
- all
- psp
restart: on-failure:1
container_name: psp-api
build:
context: source/backend
args:
BUILD_CONFIGURATION: Debug
env_file: source/backend/api/.env
ports:
- ${API_HTTPS_PORT:-5001}:443
- ${API_HTTP_PORT:-5000}:8080
depends_on:
- database
- geoserver
networks:
- psp
####################### Frontend #######################
frontend:
profiles:
- all
- psp
stdin_open: true
tty: true
restart: on-failure:1
container_name: psp-app
build:
context: source/frontend
volumes:
- ./source/frontend/src:/usr/app/src
- ./source/frontend/public:/usr/app/public
- frontend-node-cache:/usr/app/node_modules
ports:
- ${APP_HTTP_PORT:-3000}:3000
depends_on:
- backend
env_file: ./source/frontend/.env
networks:
- psp
####################### GeoServer #######################
geoserver:
profiles:
- all
- psp
image: kartoza/geoserver:2.19.2
volumes:
- ./tools/geoserver/geoserver_data:/opt/geoserver/data_dir/workspaces
ports:
- 8600:8080
restart: on-failure
env_file: tools/geoserver/.env
healthcheck:
test: curl --fail -s http://localhost:8080/ || exit 1
interval: 1m30s
timeout: 10s
retries: 3
networks:
- psp
####################### Clam AV #######################
# example av test file here: https://serverfault.com/questions/484082/how-should-i-test-clam-anti-virus
clamav:
profiles:
- all
image: mkodockx/docker-clamav:alpine-idb-amd64
environment:
- CLAMD_CONF_MaxFileSize=500M
- CLAMD_CONF_StreamMaxLength=500M
ports:
- 3310:3310
restart: on-failure
container_name: psp-clamav
healthcheck:
test: [ "CMD", "./check.sh" ]
interval: 60s
retries: 3
start_period: 120s
networks:
- psp
prometheus:
profiles:
- all
- monitoring
image: ubuntu/prometheus
container_name: psp-prometheus
ports:
- 9000:9090
environment:
- TZ=UTC
volumes:
- ./tools/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./tools/prometheus/alert-rules.yml:/etc/prometheus/alert-rules.yml
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--web.enable-lifecycle"
grafana:
profiles:
- all
- monitoring
image: grafana/grafana-oss
container_name: psp-grafana
restart: on-failure
ports:
- 4000:3000
depends_on:
- prometheus
####################### Networks Definition #######################
networks:
psp:
name: psp
driver: bridge
####################### Volumes Definition #######################
volumes:
api-db-data:
name: psp-api-db-data
api-db-rhel-data:
name: psp-api-db-rhel-data
frontend-node-cache:
name: psp-frontend-node-cache