-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (42 loc) · 1005 Bytes
/
docker-compose.yml
File metadata and controls
48 lines (42 loc) · 1005 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
41
42
43
44
45
46
47
services:
blogapi1:
container_name: blog-api1
depends_on:
db:
condition: service_healthy
build:
context: .
dockerfile: BlogApi/Dockerfile
networks:
- mynetwork
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ConnectionStrings__SqlConnection=Host=db;Port=5432;Database=blog1;Username=postgres;Password=password
ports:
- "5000:5000"
- "5001:5001"
db:
image: postgres:latest
container_name: blog1.database
restart: always
environment:
- POSTGRES_DB=blog1
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "4400:80"
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
networks:
- mynetwork
volumes:
postgres_data:
networks:
mynetwork: