Skip to content

Instantly share code, notes, and snippets.

@radimih
Created April 10, 2025 10:20
Show Gist options
  • Save radimih/04920cd22eefaf03076f7d5656fcf4c0 to your computer and use it in GitHub Desktop.
Save radimih/04920cd22eefaf03076f7d5656fcf4c0 to your computer and use it in GitHub Desktop.
Docker Compose: задержка запуска сервиса
services:
backend:
image: backend
# Контейнер получит статус healthy спустя 5 секунд после запуска сервиса.
# Это нужно, чтобы frontend запустился с задержкой
healthcheck:
test: ["CMD", "true"]
interval: 24h
start_period: 5s
start_interval: 5s
restart: unless-stopped
frontend:
image: frontend
depends_on:
config-service:
condition: service_healthy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment