Skip to content

Commit 6c89c36

Browse files
authored
Merge pull request #26 from aravindan888/main
Update and rename sample-compose-fixed.yaml to docker-compose.yaml
2 parents 9fece12 + 4e425e6 commit 6c89c36

File tree

2 files changed

+51
-26
lines changed

2 files changed

+51
-26
lines changed

docker-compose.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
version: '3.9'
2+
3+
services:
4+
python:
5+
build:
6+
context: ./apps/python
7+
container_name: sample-python
8+
ports:
9+
- "3004:3004"
10+
environment:
11+
PORT: 3004
12+
networks:
13+
- app-net
14+
healthcheck:
15+
test: ["CMD", "python", "-c", "import urllib.request; exit(0) if urllib.request.urlopen('http://localhost:3004/health').getcode() == 200 else exit(1)"]
16+
interval: 10s
17+
timeout: 5s
18+
retries: 5
19+
logging:
20+
driver: "json-file"
21+
options:
22+
max-size: "10m"
23+
max-file: "3"
24+
25+
go:
26+
build:
27+
context: ./apps/go
28+
container_name: sample-go
29+
ports:
30+
- "3002:3002"
31+
environment:
32+
PORT: 3002
33+
networks:
34+
- app-net
35+
depends_on:
36+
python:
37+
condition: service_healthy
38+
healthcheck:
39+
test: ["CMD-SHELL", "wget -q --spider http://localhost:3002/health || exit 1"]
40+
interval: 10s
41+
timeout: 5s
42+
retries: 5
43+
logging:
44+
driver: "json-file"
45+
options:
46+
max-size: "10m"
47+
max-file: "3"
48+
49+
networks:
50+
app-net:
51+
driver: bridge

sample-compose-fixed.yaml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)