Skip to content

feat(docker): add container health checks#462

Open
devEunicee wants to merge 1 commit into
PrincessnJoy:mainfrom
devEunicee:feature/289-docker-health-checks
Open

feat(docker): add container health checks#462
devEunicee wants to merge 1 commit into
PrincessnJoy:mainfrom
devEunicee:feature/289-docker-health-checks

Conversation

@devEunicee

Copy link
Copy Markdown
Contributor

Summary

Closes #289

Docker containers now expose health status so orchestration tools (Docker Swarm, Kubernetes, CI pipelines) can determine service readiness before routing traffic or running dependent jobs.

Changes

Dockerfile

  • Added HEALTHCHECK instruction polling ${STELLAR_RPC_URL:-http://localhost:8000}/health every 30 s (timeout 10 s, start-period 15 s, retries 3)

docker-compose.yml

  • stellar-node: added healthcheck on http://localhost:8000/health (interval 15 s, start-period 30 s to allow node init, retries 5)
  • dev: added healthcheck on http://stellar-node:8000/health; changed depends_on to condition: service_healthy so the build container only starts after the node is ready

docs/GETTING_STARTED.md

  • Added Container Health Checks section documenting endpoint, intervals, and semantics for both services and the standalone Dockerfile HEALTHCHECK

- Add HEALTHCHECK to Dockerfile using STELLAR_RPC_URL/health endpoint
  (interval 30s, timeout 10s, start-period 15s, retries 3)
- Add healthcheck to stellar-node service in docker-compose.yml
  (interval 15s, timeout 10s, start-period 30s, retries 5)
- Add healthcheck to dev service; make it depend on stellar-node
  being healthy before starting (condition: service_healthy)
- Document container health semantics in docs/GETTING_STARTED.md

Closes PrincessnJoy#289
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add backend service container health checks in Docker

1 participant