-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (40 loc) · 830 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
44 lines (40 loc) · 830 Bytes
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
version: '3.7'
services:
api:
container_name: api
build:
context: .
target: $ENV
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
- ./logs/:/usr/src/app/logs
ports:
- ${API_PORT}:${API_PORT}
- 9229:9229
command: yarn start:$ENV
env_file:
- .env
- .env.${ENV}
networks:
- private-network
postgres_db:
container_name: postgres_db
stdin_open: true # docker run -i
tty: true # docker run -t
image: postgres
ports:
- '5432:5432'
env_file:
- .env
- .env.${ENV}
environment:
- PGDATA=/var/lib/postgresql/data
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- private-network
networks:
private-network:
volumes:
postgres-data: