version: '3.9' services: app1: build: context: ./app1 dockerfile: Dockerfile container_name: simple-http-server ports: - "8000:8000" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000"] interval: 30s timeout: 10s retries: 3 start_period: 10s app2: build: context: ./app2 dockerfile: Dockerfile container_name: simple-python-script healthcheck: test: ["CMD", "python", "-c", "import os; exit(0 if os.path.exists('/tmp/healthy') else 1)"] interval: 30s timeout: 10s retries: 3 start_period: 5s