-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (36 loc) · 786 Bytes
/
docker-compose.yml
File metadata and controls
40 lines (36 loc) · 786 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
version: "3.8"
services:
banco:
image: bitnami/postgresql:13
container_name: pixel-api-database
restart: always
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
DATABASE_HOST: ${DB_HOST}
ports:
- "${DB_PORT}:5432" # mapeia a porta 5432 do container para a DB_PORT local
networks:
- rede-interna
volumes:
- postgresdb_vol:/var/lib/postgresql/data
api:
container_name: pixel-api
build: .
restart: always
depends_on:
- banco
networks:
- rede-interna
links:
- banco
ports:
- "${APP_PORT}:${APP_PORT}"
volumes:
node_modules_vol:
postgresdb_vol:
networks:
rede-interna:
name: rede-interna
driver: bridge