Improve Docker Compose setup with environment variables and health checks#3
Merged
peteralcock merged 1 commit intomainfrom Jan 31, 2026
Merged
Conversation
- Rewrite docker-compose.yml: build from Dockerfile instead of pre-built image, add YAML anchor for shared app config, enable nginx reverse proxy, fix sidekiq command, add health checks with dependency ordering, add restart policies, use init.sql for DB initialization - Improve rails-entrypoint.sh: wait for PostgreSQL readiness before starting, auto-run migrations on boot, use exec for proper signal handling - Fix config/cable.yml: use REDIS_HOST/REDIS_PORT env vars so ActionCable connects to the Redis container in Docker Services: PostgreSQL, Redis, Rails (Puma), Sidekiq, Nginx https://claude.ai/code/session_01UPcymGmBUdtTd33qSYF24Q
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR significantly improves the Docker Compose configuration and deployment setup for ZEPSEC (RISM) by adding environment variable support, comprehensive health checks, proper service dependencies, and an enhanced entrypoint script. The changes make the application more robust and production-ready.
Key Changes
Redis Configuration: Updated
config/cable.ymlto use environment variables (REDIS_HOSTandREDIS_PORT) instead of hardcoded localhost values, allowing flexible deployment configurations.Docker Compose Restructuring:
x-app-commonanchor to reduce duplication across app and sidekiq servicescondition: service_healthyrism_prefix for cleaner organization)restart: unless-stoppedpolicy for all servicesRails Entrypoint Script Enhancement:
rm -fcommandexecfor proper signal handlingDocumentation: Updated inline comments with clearer quick-start instructions and operational commands.
Notable Implementation Details
https://claude.ai/code/session_01UPcymGmBUdtTd33qSYF24Q