-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (40 loc) · 945 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
version: '3.9'
services:
postgres_database:
container_name: postgres_database
hostname: ${POSTGRES_HOST}
image: postgres
ports:
- ${POSTGRES_PORT}:5432
environment:
PGDATA: /var/lib/postgresql/data/
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- ./postgres_${NODE_ENV}:/var/lib/postgresql/data
restart: unless-stopped
networks:
- backend
server:
container_name: server
ports:
- ${PORT}:5000
build:
context: ./
dockerfile: Dockerfile
args:
- NODE_ENV
volumes:
- ./:/var/www/backend
- ./node_modules:/var/www/backend/node_modules
restart: always
command: bash ./start_app.sh ${NODE_ENV}
links:
- postgres_database:${POSTGRES_HOST}
depends_on:
- postgres_database
networks:
- backend
networks:
backend: