generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (51 loc) · 1.44 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
version: '3.9'
x-common: &common
depends_on: ["backend"]
environment:
VITE_BACKEND_URL: http://backend:5000
VITE_ZONE: PROD
healthcheck:
test: wget --no-verbose --spider http://localhost:3000
interval: 15s
retries: 5
timeout: 5s
start_period: 10s
restart: always
services:
backend:
container_name: backend
entrypoint: sh -c "npm ci && npm run start"
environment:
CHES_CLIENT_ID: 09C5071A-ACE9B6FACF6
CHES_TOKEN_URL: https://test.loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token
S3_ACCESSKEY: nr-fsa-tst
S3_BUCKETNAME: tivpth
S3_ENDPOINT: nrs.objectstore.gov.bc.ca
S3_SECRETKEY: ${S3_SECRETKEY}
healthcheck:
test: timeout 10s bash -c 'true > /dev/tcp/127.0.0.1/5000'
interval: 15s
retries: 5
start_period: 10s
timeout: 5s
image: node:20.18.1-bullseye-slim
ports: ["5000:5000"]
restart: always
volumes: ["./backend:/app", "/app/node_modules"]
working_dir: "/app"
frontend:
container_name: frontend
profiles: [dev, frontend]
entrypoint: sh -c "npm ci && npm run start"
image: node:20-bullseye
ports: ["3000:3000"]
volumes: ["./frontend:/app", "/app/node_modules"]
working_dir: "/app"
<<: *common
caddy:
container_name: caddy
profiles: [caddy]
build: ./frontend
ports: ["3000:3000"]
volumes: ["./frontend/Caddyfile:/etc/caddy/Caddyfile"]
<<: *common