generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
97 lines (92 loc) · 2.63 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
---
version: '3.8'
x-var:
- &POSTGRES_USER default
- &POSTGRES_PASSWORD default
- &POSTGRES_DATABASE default
services:
database:
container_name: database
environment:
POSTGRES_USER: default
POSTGRES_PASSWORD: default
POSTGRES_DB: default
hostname: database
ports:
- '5432:5432'
image: postgres:12
restart: always
volumes:
- /pgdata
healthcheck:
test: ['CMD', 'pg_isready', '-U', *POSTGRES_USER]
migrations:
image: flyway/flyway:9-alpine
container_name: migrations
command: info migrate info
volumes: ['./migrations/sql:/flyway/sql:ro']
environment:
FLYWAY_URL: jdbc:postgresql://database:5432/postgres
FLYWAY_USER: *POSTGRES_USER
FLYWAY_PASSWORD: *POSTGRES_PASSWORD
FLYWAY_BASELINE_ON_MIGRATE: true
FLYWAY_DEFAULT_SCHEMA: USERS
depends_on:
database:
condition: service_healthy
backend:
container_name: backend
entrypoint:
- 'sh'
- '-c'
- 'npm i && npm run start'
environment:
NODE_ENV: development
POSTGRES_HOST: database
POSTGRES_USER: default
POSTGRES_PASSWORD: default
POSTGRES_DATABASE: default
session_secret: asdfasdh
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/report']
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'
- 'apt-get update && apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm-dev && npm i && npm run start'
environment:
NODE_ENV: development
REACT_APP_API_URL: http://backend
COOKIE_SECRET: asdf
SESSION_SECRET: fdsa
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/report']
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
hostname: frontend
image: node:14
links:
- backend
ports:
- '3000:3000'
volumes:
- ./frontend:/app:z
- /app/node_modules
working_dir: '/app'