-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
55 lines (55 loc) · 1.19 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
version: '3.8'
services:
###########################
# APPLICATION SERVICES
###########################
app:
build: .
restart: always
healthcheck:
start_period: 60ms
timeout: 120s
interval: 30s
test: ifconfig | grep broadcast
ports:
- 3000:3000
env_file: .env
depends_on:
- database
volumes:
- ./:/usr/share/app
- /usr/share/app/node_modules
networks:
- node_networks
###########################
# DATABASE SERVICES
###########################
database:
image: postgres:14-alpine
restart: always
healthcheck:
start_period: 60ms
timeout: 120s
interval: 30s
test: ifconfig | grep broadcast
ports:
- 5432:5432
env_file: .env
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
volumes:
- database-data:/var/lib/postgres/data
networks:
- node_networks
###########################
# VOLUME PERSISTENT DATA
###########################
volumes:
database-data:
###########################
# NETWORK SHARING GROUP
###########################
networks:
node_networks: