plane icon indicating copy to clipboard operation
plane copied to clipboard

fix: Add curl in Space image and fix route used in HEALTHCHECK that was causing unhealthy status

Open gustoliveira opened this issue 1 week ago โ€ข 2 comments

Description

Issue in https://github.com/makeplane/plane/issues/8392

The space app container was consistently marked as unhealthy because:

  1. Missing curl: The HEALTHCHECK command relies on curl, which was not installed in the Alpine-based image.
  2. 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 curl in the runner stage.
    • Update HEALTHCHECK to http://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.

gustoliveira avatar Dec 18 '25 21:12 gustoliveira

[!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 curl installation command and image layering.
    • Verify HEALTHCHECK syntax and expected endpoint availability (port/path).
    • Ensure no missing runtime dependencies were assumed.

Possibly related issues

  • #8392 โ€” Matches: addresses missing curl and 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.

โค๏ธ Share

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

coderabbitai[bot] avatar Dec 18 '25 21:12 coderabbitai[bot]

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.

garylavayou avatar Dec 23 '25 01:12 garylavayou