File size: 628 Bytes
1a64d85
3edd107
1a64d85
3edd107
1a64d85
3edd107
1a64d85
3edd107
1a64d85
3edd107
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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