-
Notifications
You must be signed in to change notification settings - Fork 43
/
docker-compose.yml
63 lines (60 loc) · 1.46 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
services:
####################### React App #######################
pims-app-v2:
tty: true
restart: 'no'
container_name: pims-app-v2
build:
context: react-app
target: prod
ports:
- ${APP_HTTP_PORT:-3000}:3000
depends_on:
- pims-api-v2
env_file: .env
networks:
- pims
####################### Express API #######################
pims-api-v2:
restart: 'no'
container_name: pims-api-v2
build:
context: express-api
target: Prod
env_file:
- .env
ports:
- ${API_HTTP_PORT:-5000}:5000
depends_on:
- postgres
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:5000/api/v2/health']
interval: 300s
timeout: 10s
retries: 3
networks:
- pims
####################### Postgres #######################
postgres:
container_name: postgres
image: postgres:15.7
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- ./database/postgres/data/db:/data/db
ports:
- '${POSTGRES_PORT:-5432}:5432'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER} || exit 1']
interval: 5s
timeout: 3s
networks:
- pims
####################### Networks Definition #######################
networks:
pims:
name: pims-net
driver: bridge