generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
65 lines (60 loc) · 1.85 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
---
version: "3.9"
x-var:
- &POSTGRES_USER
postgres
- &POSTGRES_PASSWORD
default
- &POSTGRES_DATABASE
postgres
x-postgres-vars: &postgres-vars
POSTGRES_HOST: database
POSTGRES_USER: *POSTGRES_USER
POSTGRES_PASSWORD: *POSTGRES_PASSWORD
POSTGRES_DATABASE: *POSTGRES_DATABASE
services:
database:
image: postgis/postgis:16-3.4
container_name: cm-database
environment:
<<: *postgres-vars
healthcheck:
test: ["CMD", "pg_isready", "-U", *POSTGRES_USER]
ports: ["5433:5432"]
migrations:
image: flyway/flyway:9.22-alpine
container_name: case-management-migrations
command:
- info
- migrate
- -outOfOrder=true
volumes: ["./migrations/sql:/flyway/sql:ro"]
environment:
FLYWAY_URL: jdbc:postgresql://cm-database:5432/postgres
FLYWAY_USER: *POSTGRES_USER
FLYWAY_PASSWORD: *POSTGRES_PASSWORD
FLYWAY_BASELINE_ON_MIGRATE: true
FLYWAY_DEFAULT_SCHEMA: case_management
depends_on:
database:
condition: service_healthy
backend:
container_name: cm-backend
entrypoint: sh -c "npm i && npm run start:dev"
environment:
<<: *postgres-vars
NODE_ENV: development
POSTGRESQL_URL: "postgresql://postgres:default@cm-database:5432/postgres?schema=case_management"
BACKEND_PORT: "3000"
KEYCLOCK_CLIENT_ID: compliance-and-enforcement-digital-services-web-4794
JWKS_URI: https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs
JWT_ISSUER: https://dev.loginproxy.gov.bc.ca/auth/realms/standard
image: node:20-bullseye
ports: ["3003:3000"]
volumes: ["./backend:/app", "/app/node_modules"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api"]
working_dir: "/app"
depends_on:
migrations:
condition: service_completed_successfully