fix: Add curl in Space image and fix route used in HEALTHCHECK that was causing unhealthy status
Description
Issue in https://github.com/makeplane/plane/issues/8392
The space app container was consistently marked as unhealthy because:
- Missing
curl: The HEALTHCHECK command relies on curl, which was not installed in the Alpine-based image. - Incorrect Route: The healthcheck was hitting the root path (/), but the application is configured to run under the /spaces/ basename, resulting in 404 errors.
Changes
- Dockerfile.space:
- Added curl to the base stage to ensure it's available for the healthcheck.
- Added libc6-compat (recommended for Alpine when running Node.js apps with native dependencies like Turbo).
- Updated the HEALTHCHECK command to point to http://127.0.0.1:3000/spaces/ instead of the root.
Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] Feature (non-breaking change which adds functionality)
- [x] Improvement (change that would cause existing functionality to not work as expected)
- [ ] Code refactoring
- [ ] Performance improvements
- [ ] Documentation update
Test Scenarios
- Build the image and run the container: the status should now transition from starting to healthy after the start period.
[!NOTE] Installs curl in the Space runner image and updates the HEALTHCHECK to target /spaces/ instead of /.
- Docker (Space):
- Install
curlin therunnerstage.- Update
HEALTHCHECKtohttp://127.0.0.1:3000/spaces/(was/).Written by Cursor Bugbot for commit 0b3a29ff7de36f86992cef83c4cb91da234c23e8. This will update automatically on new commits. Configure here.
Summary by CodeRabbit
- Chores
- Added a small networking tool to the runtime image to improve runtime operations and debugging.
- Improved health monitoring by updating the service health check to target the spaces endpoint, enhancing more accurate readiness/liveness detection.
โ๏ธ Tip: You can customize this high-level summary in your review settings.
[!NOTE]
Other AI code review bot(s) detected
CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.
Walkthrough
Updated the Space service Dockerfile to install the missing curl package in the runner image and adjusted the HEALTHCHECK to query http://127.0.0.1:3000/spaces/ instead of the root path.
Changes
| Cohort / File(s) | Summary |
|---|---|
Docker configuration apps/space/Dockerfile.space |
Added curl to the runner image via apk add --no-cache curl; changed HEALTHCHECK target from / to /spaces/ |
Estimated code review effort
๐ฏ 2 (Simple) | โฑ๏ธ ~10 minutes
- Single-file change with small, localized edits.
- Review focus:
- Confirm
curlinstallation command and image layering. - Verify HEALTHCHECK syntax and expected endpoint availability (port/path).
- Ensure no missing runtime dependencies were assumed.
- Confirm
Possibly related issues
#8392โ Matches: addresses missingcurland incorrect HEALTHCHECK endpoint reported there.
Poem
๐ฐ I nibbled the Dockerfile, found curl to add,
The health check now hops to/spaces/โ not bad.
Containers breathe easy, the runner feels new,
A tiny tweak, a happy brew. โจ
Pre-merge checks and finishing touches
โ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | โ Passed | The title accurately and specifically describes the main changes: adding curl to the Space image and fixing the HEALTHCHECK route from / to /spaces/. |
| Description check | โ Passed | The description includes all required template sections with clear details: problem statement, changes made, bug fix/improvement type selection, and test scenarios. |
| Docstring Coverage | โ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
โจ Finishing touches
๐งช Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
A temporary solution: update healthcheck in docker compose file:
services:
space:
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:3000/spaces"]
using the available wgetcommand to perform check.