generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
62 lines (59 loc) · 1.27 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
---
version: "3.8"
services:
database:
build:
context: database
container_name: database
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: default
POSTGRES_DB: default
hostname: database
restart: always
user: postgres
volumes:
- /pgdata
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: default
hostname: backend
image: registry.access.redhat.com/ubi8/nodejs-18-minimal
links:
- database
ports:
- "3001:3000"
volumes:
- ./backend:/app:z
- /app/node_modules
user: root
working_dir: "/app"
frontend:
container_name: frontend
entrypoint:
- "sh"
- "-c"
- "chown -R root . && npm ci && npm run dev"
environment:
NODE_ENV: development
BACKEND_URL: backend
hostname: frontend
image: registry.access.redhat.com/ubi8/nodejs-18-minimal
links:
- backend
ports:
- "3000:3000"
volumes:
- ./frontend:/app:z
- /app/node_modules
user: root
working_dir: "/app"