Created
April 10, 2025 10:20
-
-
Save radimih/04920cd22eefaf03076f7d5656fcf4c0 to your computer and use it in GitHub Desktop.
Docker Compose: задержка запуска сервиса
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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