-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (51 loc) · 1.21 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
45
46
47
48
49
50
51
52
53
54
55
version: '3.9'
networks:
webapi-network:
driver: bridge
services:
database:
image: postgres:latest
volumes:
- /var/lib/postgresql/data/
environment:
- POSTGRES_DB=animal-chipization
- POSTGRES_USER=zubriq
- POSTGRES_PASSWORD=zubriq
networks:
- webapi-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 3s
timeout: 5s
retries: 100
restart: always
webapi:
image: olympproject:latest
ports:
- "8080:8080"
environment:
ConnectionStrings__PostgreSQL: "Host=database;Port=5432;Database=animal-chipization;Username=zubriq;Password=zubriq"
networks:
- webapi-network
healthcheck:
test: ["CMD-SHELL", "curl --fail http://webapi:8080/health || exit 1"]
interval: 3s
timeout: 5s
retries: 100
depends_on:
database:
condition: service_healthy
restart: always
tests:
image: mrexpen/planet_olymp_phase2
pull_policy: always
ports:
- "8090:8080"
depends_on:
- webapi
environment:
SERVER_URL: http://webapi:8080
STAGE: all
networks:
- webapi-network
restart: always