-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (61 loc) · 1.47 KB
/
docker-compose.yml
File metadata and controls
65 lines (61 loc) · 1.47 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
networks:
messagingplatform:
driver: bridge
services:
web:
container_name: messagingplatform-web
build:
context: ./web
dockerfile: Dockerfile
ports:
- 4200:80
depends_on:
backend:
condition: service_healthy
networks:
- messagingplatform
backend:
container_name: messagingplatform-backend
build:
context: ./backend/src
dockerfile: Dockerfile
ports:
- 9000:9000
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: "http://0.0.0.0:9000"
ConnectionStrings__DefaultConnection: "Host=messagingplatform-postgres;Database=MessagingPlatformDb;Username=postgres;Password=mysecretpassword"
healthcheck:
test:
[
"CMD-SHELL",
"curl -f http://messagingplatform-backend:9000/health || exit 1",
]
interval: 10s
timeout: 5s
retries: 3
depends_on:
postgres:
condition: service_healthy
networks:
- messagingplatform
postgres:
container_name: messagingplatform-postgres
image: postgres:15-alpine
ports:
- 5433:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: mysecretpassword
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- messagingplatform
volumes:
postgres-data: