# Demo services next to the bot — the same Compose project, so the bot sees them on its network: # make demo-up (= docker compose -f docker-compose.yml -f examples/docker-compose.yml up -d) # make demo-down # The label tgit.managed=true is what makes them appear in «🩺 Статус», «📜 Логи» and alerts. x-demo: &demo image: python:3.12-slim working_dir: /demo volumes: - ./examples:/demo:ro environment: PYTHONUNBUFFERED: "1" mem_limit: 64m logging: options: { max-size: "5m", max-file: "2" } services: demo-hello: <<: *demo command: ["python", "hello_service.py"] restart: unless-stopped healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"] interval: 10s timeout: 3s retries: 3 labels: tgit.managed: "true" tgit.health_url: http://demo-hello:8000/health demo-crash: <<: *demo command: ["python", "crash.py"] restart: on-failure labels: tgit.managed: "true" demo-cpu-hog: <<: *demo command: ["python", "cpu_hog.py"] restart: unless-stopped cpus: 1.0 labels: tgit.managed: "true" demo-unhealthy: <<: *demo command: ["python", "unhealthy.py"] restart: unless-stopped healthcheck: test: ["CMD", "false"] interval: 10s retries: 2 start_period: 5s labels: tgit.managed: "true"