-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
44 lines (40 loc) · 1.02 KB
/
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
version: "3.8"
services:
app:
container_name: core_api
build:
context: .
dockerfile: Dockerfile
ports:
- "3100:3100"
volumes:
- .:/usr/src/app
environment:
- DB_HOST=db
- DB_USER=root
- DB_PASS=rootpass
- DB_NAME=mydatabase
- DB_PORT=5432 # Porta padrão do PostgreSQL
depends_on:
- db
networks:
- core_network
db:
container_name: core_database
image: postgres:13 # Alterado para imagem do PostgreSQL
restart: always
ports:
- "3315:5432" # Porta padrão do PostgreSQL é 5432
environment:
POSTGRES_DB: mydatabase
POSTGRES_USER: root
POSTGRES_PASSWORD: rootpass
TZ: America/Sao_Paulo
volumes:
- ./db_data/core:/var/lib/postgresql/data # Persistência dos dados do PostgreSQL
networks:
- core_network # Conectando o serviço do banco de dados à rede
volumes:
db_data: # Volume para persistência dos dados do serviço do banco de dados core_data
networks:
core_network: