-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
32 lines (31 loc) · 775 Bytes
/
docker-compose.yml
File metadata and controls
32 lines (31 loc) · 775 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
version: "3.9"
services:
api:
build:
context: .
dockerfile: Dockerfile
target: runtime
image: "routing-table-api:latest"
container_name: routing-table-api
ports:
- "5000:5000"
volumes:
- ./routes.txt:/app/routes.txt:ro
healthcheck:
test: ["CMD-SHELL", "python -c 'import urllib.request; urllib.request.urlopen(\"http://localhost:5000/health\")'"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
tests:
build:
context: .
dockerfile: Dockerfile
target: development
image: "routing-table-api:test"
container_name: routing-table-api-tests
depends_on:
api:
condition: service_healthy
environment:
- API_URL=http://api:5000