generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
121 lines (120 loc) · 3.15 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
---
version: "3.8"
services:
database:
build:
context: database
container_name: database
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: default
POSTGRES_DB: postgres
hostname: database
restart: always
user: postgres
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 15s
timeout: 5s
retries: 3
volumes:
- /pgdata
database-migrations:
image: flyway/flyway:10-alpine
container_name: backend-migrations
command:
- info
- migrate
- -outOfOrder=true
volumes:
- "./migrations/migrations:/flyway/sql"
- "./migrations/test-only-migrations:/flyway/sql-test"
environment:
- FLYWAY_URL=jdbc:postgresql://database:5432/postgres
- FLYWAY_USER=postgres
- FLYWAY_PASSWORD=default
- FLYWAY_BASELINE_ON_MIGRATE=true
- FLYWAY_DEFAULT_SCHEMA=public
- FLYWAY_LOCATIONS=filesystem:./sql, filesystem:./sql-test
depends_on:
database:
condition: service_healthy
backend:
container_name: backend
entrypoint:
- "sh"
- "-c"
- "npm i && npm run start"
environment:
NODE_ENV: development
POSTGRESQL_HOST: database
POSTGRESQL_USER: postgres
POSTGRESQL_PASSWORD: default
POSTGRESQL_DATABASE: postgres
hostname: backend
image: registry.access.redhat.com/ubi8/nodejs-18-minimal@sha256:dfaa7bbc56a7fb02046d2e89e74a65693c522d8e25d4f318c676f0ad15e67168
links:
- database
ports:
- "3001:3000"
volumes:
- ./backend:/app:z
- /app/node_modules
user: root
working_dir: "/app"
depends_on:
database:
condition: service_healthy
database-migrations:
condition: service_started
frontend:
container_name: frontend
entrypoint:
- "sh"
- "-c"
- "chown -R root . && npm ci && npm run start"
environment:
NODE_ENV: development
REACT_APP_API_URL: http://localhost:3001/api
REACT_APP_ENVIRONMENT_NAME: DEVELOPMENT
hostname: frontend
image: registry.access.redhat.com/ubi8/nodejs-18-minimal@sha256:dfaa7bbc56a7fb02046d2e89e74a65693c522d8e25d4f318c676f0ad15e67168
links:
- backend
ports:
- "3000:3000"
volumes:
- ./frontend:/app:z
- /app/node_modules
user: root
working_dir: "/app"
nats:
image: nats:latest # Using the latest official NATS image
command:
- "-js"
- "-DVV"
ports:
- "4222:4222" # Default NATS client port
- "8222:8222" # NATS monitoring port
environment:
- NATS_USER=natsuser # this is just for the developer instance of nats
- NATS_PASSWORD=natspass # this is just for the developer instance of nats
webeoc:
container_name: webeoc
entrypoint:
- "sh"
- "-c"
- "npm i && npm run start"
hostname: webeoc
image: registry.access.redhat.com/ubi8/nodejs-18-minimal@sha256:dfaa7bbc56a7fb02046d2e89e74a65693c522d8e25d4f318c676f0ad15e67168
links:
- nats
ports:
- "3002:3000"
volumes:
- ./webeoc:/app:z
- /app/node_modules
user: root
working_dir: "/app"