-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
51 lines (48 loc) · 1.04 KB
/
docker-compose.yaml
File metadata and controls
51 lines (48 loc) · 1.04 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
version: '3.9'
services:
python:
build:
context: ./apps/python
container_name: sample-python
ports:
- "3004:3004"
environment:
PORT: 3004
networks:
- app-net
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; exit(0) if urllib.request.urlopen('http://localhost:3004/health').getcode() == 200 else exit(1)"]
interval: 10s
timeout: 5s
retries: 5
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
go:
build:
context: ./apps/go
container_name: sample-go
ports:
- "3002:3002"
environment:
PORT: 3002
networks:
- app-net
depends_on:
python:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://localhost:3002/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
app-net:
driver: bridge