generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
82 lines (79 loc) · 1.83 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
---
version: "3.8"
services:
database:
container_name: database
environment:
POSTGRES_USER: default
POSTGRES_PASSWORD: default
POSTGRES_DB: default
hostname: database
image: postgres:12
restart: always
volumes:
- /pgdata
backend:
container_name: backend
entrypoint:
- "sh"
- "-c"
- "npm i && npm run start"
environment:
NODE_ENV: development
POSTGRESQL_HOST: database
POSTGRESQL_USER: default
POSTGRESQL_PASSWORD: default
POSTGRESQL_DATABASE: default
object_store_bucket: epdsbx
object_store_host: nrs.objectstore.gov.bc.ca
object_store_secret: ${object_store_secret}
object_store_userid: ${object_store_userid}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
hostname: backend
image: node:14
links:
- database
ports:
- "3001:3000"
volumes:
- ./backend:/app:z
- /app/node_modules
working_dir: "/app"
frontend:
container_name: frontend
entrypoint:
- "sh"
- "-c"
- "npm i && npm run start"
environment:
NODE_ENV: development
BACKEND_URL: http://backend
COOKIE_SECRET: ${COOKIE_SECRET}
SESSION_SECRET: ${SESSION_SECRET}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
hostname: frontend
depends_on:
backend:
condition: service_healthy
image: esra-frontend/image:latest
build:
context: frontend
dockerfile: Dockerfile
links:
- backend
ports:
- "3000:3000"
volumes:
- ./frontend:/app:z
- /app/node_modules
working_dir: "/app"