version '3.8' services: nginx: image: nginx:latest ports: - "8080:80" healthcheck: test: ["CMD", "nc", "-z", "-v", "localhost", "80"] interval: 5s timeout: 10s retries: 15 start_period: 5s