-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
39 lines (37 loc) · 1.32 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
services:
todo_rest_api:
container_name: todo_rest_api
build:
context: .
dockerfile: Dockerfile-go
ports:
- "8000:8000"
depends_on:
- todo_postgresql
networks:
- todo_network
todo_postgresql:
container_name: todo_postgresql
build:
context: .
dockerfile: Dockerfile-postgres
args:
POSTGRES_DB: todo_db
POSTGRES_SERVICE_USER: todo_service
POSTGRES_SERVICE_USER_PASSWORD: todo_service_password
# volumes: # Uncomment these lines if you want to persist the data even after deleting the containers
# - todo_data:/var/lib/postgresql/data # Uncomment these lines if you want to persist the data even after deleting the containers
restart: always
environment:
POSTGRES_DB: todo_db
POSTGRES_USER: todo_user
POSTGRES_PASSWORD: todo_password
ports:
- "5433:5432"
networks:
- todo_network
#volumes: # Uncomment these lines if you want to persist the data even after deleting the container
# todo_data: # Uncomment these lines if you want to persist the data even after deleting the container
networks:
todo_network:
driver: bridge