generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
89 lines (83 loc) · 2.29 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
# Reusable vars
x-var:
- &POSTGRES_USER
postgres
- &POSTGRES_PASSWORD
default
- &POSTGRES_DATABASE
cms
services:
database:
image: postgres:16.4
container_name: database
environment:
POSTGRES_HOST: database
POSTGRES_USER: *POSTGRES_USER
POSTGRES_PASSWORD: *POSTGRES_PASSWORD
POSTGRES_DB: *POSTGRES_DATABASE
healthcheck:
test: ["CMD", "pg_isready", "-U", *POSTGRES_USER]
ports: ["5432:5432"]
cms:
container_name: cms
entrypoint: sh -c "npm i && npm run develop"
environment:
DATABASE_CLIENT: postgres
DATABASE_HOST: database
DATABASE_PORT: 5432
DATABASE_NAME: *POSTGRES_DATABASE
DATABASE_USERNAME: *POSTGRES_USER
DATABASE_PASSWORD: *POSTGRES_PASSWORD
DATABASE_SSL: false
APP_KEYS: a,b,c,d
API_TOKEN_SALT: default
ADMIN_JWT_SECRET: default
TRANSFER_TOKEN_SALT: default
JWT_SECRET: default
HOSTNAME: "http://localhost:1337"
KEYCLOAK_REALM: standard
KEYCLOAK_URL: https://dev.loginproxy.gov.bc.ca/auth
KEYCLOAK_CLIENT_ID: bcmi-cms-5784
KEYCLOAK_CLIENT_SECRET: default
NODE_ENV: development
image: node:20.18
ports: ["1337:1337"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:1337/admin"]
working_dir: "/app"
volumes: ["./cms:/app", "/app/node_modules"]
depends_on:
database:
condition: service_healthy
frontend:
container_name: frontend
entrypoint: sh -c "npm ci && npm run start -- --host 0.0.0.0"
environment:
CMS_URL: http://cms:1337
PORT: 3000
NODE_ENV: development
image: node:20.18
ports: ["3000:3000"]
volumes: ["./frontend:/app", "/app/node_modules"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
working_dir: "/app"
depends_on:
cms:
condition: service_healthy
caddy:
container_name: caddy
profiles: ["caddy"]
build: ./frontend
environment:
NODE_ENV: development
PORT: 3000
CMS_URL: http://cms:1337
LOG_LEVEL: info
ports: ["3005:3000"]
volumes: ["./frontend/Caddyfile:/etc/caddy/Caddyfile"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
depends_on:
cms:
condition: service_healthy