Skip to content

Conversation

@andreslucena
Copy link
Member

@andreslucena andreslucena commented Jan 22, 2026

I wanted to provide quick instructions to someone for using a demo of Decidim, but when I checked the docker-compose locally I noticed that it didn't work out-of-the-box with the instructions that we have in the README of this repository. This PR fixes it.

Testing

Same instructions that we have in the README

git clone git@github.com:decidim/docker.git decidim-docker
cd decidim-docker
docker-compose up

Summary by CodeRabbit

  • Chores
    • Updated database service configuration with health checks for improved reliability and readiness verification.
    • Configured service dependencies to ensure proper startup sequence.
    • Updated database connection settings and added credential management for enhanced security.

✏️ Tip: You can customize this high-level summary in your review settings.

- Prefer usage of postgres vs pg
- Ping the image to supported postgres version
- Fix the environment variables so we don't need to use 'trust'
- Hardcode the postgres DB password (this is just a demo)
- Add healthcheck
- Add explicit depenency between decidim and postgres
@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

The Docker Compose configuration is updated to replace the PostgreSQL service definition, renaming the top-level key from "version" to "name," adding service health checks, updating the database hostname from "pg" to "postgres," and introducing new environment variables for database credentials and password management.

Changes

Cohort / File(s) Summary
Docker Compose Configuration
docker-compose.yml
Upgraded PostgreSQL service setup with postgres:16.1 image, added health-based service dependencies, renamed pg to postgres, introduced healthcheck using pg_isready, added DATABASE_PASSWORD and POSTGRES_PASSWORD environment variables, updated volume naming from pg-data to postgres-data, and changed top-level key from version to name.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A compose file hops to new heights,
Postgres now healthy, checked day and night,
Credentials secured, databases strong,
Services depend on each other all along,
Docker stacks greener, where all things belong! 🌱

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Fix docker compose instructions' is vague and does not clearly describe the specific changes made to the docker-compose.yml file. Consider a more specific title like 'Update docker-compose with postgres service and healthcheck' to better reflect the main changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants