-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (36 loc) · 1014 Bytes
/
docker-compose.yml
File metadata and controls
36 lines (36 loc) · 1014 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
services:
postgres:
image: postgres:15-alpine
container_name: todo-db
restart: always
environment:
POSTGRES_DB: TestDB
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password123
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- todo-network
backend:
build:
context: ./ToDoList.Api
dockerfile: Dockerfile
container_name: todo-api
restart: on-failure
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: http://+:80
ConnectionStrings__DefaultConnection: "Host=postgres;Port=5432;Database=TestDB;Username=postgres;Password=password123"
depends_on:
- postgres
ports:
- "5000:80"
networks:
- "todo-network"
networks:
todo-network:
driver: bridge
volumes:
postgres_data: