-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (45 loc) · 962 Bytes
/
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
version: '3.9'
services:
app_server:
container_name: rosalian_server
image: rosalian_server:1.0.0
build:
context: .
target: production
dockerfile: ./Dockerfile
command: npm run start:prod
env_file: .env
ports:
- '3000:3000'
- '9229:9229'
networks:
- app-network
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
restart: unless-stopped
depends_on:
- database
database:
container_name: rosalian_postgres_dev
image: postgres:12
environment:
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_DB=$POSTGRES_DB
env_file: .env
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- app-network
ports:
- '5432:5432'
healthcheck:
test: pg_isready
interval: 10s
timeout: 5s
retries: 5
networks:
app-network:
volumes:
postgres-data: