-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (34 loc) · 907 Bytes
/
docker-compose.yml
File metadata and controls
35 lines (34 loc) · 907 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
version: "3"
services:
db:
image: postgres:13
container_name: db
restart: always #container reinicia se morrer
ports:
- 2345:5432
env_file:
- .env #configurar POSTGRES_USER, POSTGRES_PASSWORD e POSTGRES_DB
# networks:
# - orkut
volumes:
- postgres:/var/lib/postgresql/data # onde os dados do postgres ficam
node_app:
container_name: node_app
build: . #Dockerfile do node se encontra na pasta atual
ports:
- 5000:5000
depends_on:
- db # só sobe quando o postgres tiver no ar
env_file:
- .env #configurar DATABASE_URL
# networks:
# - orkut
volumes:
- .:/usr/src
- /usr/src/node_modules
networks:
orkut:
driver: bridge
postgres:
volumes:
postgres: