46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
services:
|
|
connectivity-tester:
|
|
image: docker.io/library/python:3.12-slim
|
|
hostname: connectivity-tester
|
|
user: "0:0"
|
|
working_dir: /app
|
|
entrypoint: ["python", "/app/app.py", "--entrypoint"]
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
healthcheck:
|
|
test: ["CMD", "python", "/app/app.py", "--healthcheck"]
|
|
interval: 60s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
configs:
|
|
- source: connectivity_tester_app
|
|
target: /app/app.py
|
|
mode: 0444
|
|
- source: connectivity_tester_network_map
|
|
target: /app/network_map.py
|
|
mode: 0444
|
|
- source: connectivity_tester_requirements
|
|
target: /app/requirements.txt
|
|
mode: 0444
|
|
deploy:
|
|
mode: global
|
|
resources:
|
|
limits:
|
|
memory: 128M
|
|
pids: 64
|
|
reservations:
|
|
memory: 64M
|
|
restart_policy:
|
|
condition: on-failure
|
|
delay: 10s
|
|
max_attempts: 3
|
|
|
|
configs:
|
|
connectivity_tester_app:
|
|
file: ./app.py
|
|
connectivity_tester_network_map:
|
|
file: ./network_map.py
|
|
connectivity_tester_requirements:
|
|
file: ./requirements.txt
|