Skip to content

Conversation

@gustoliveira
Copy link
Contributor

@gustoliveira gustoliveira commented Dec 18, 2025

Description

Issue in #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

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • 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 0b3a29f. 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.

Copilot AI review requested due to automatic review settings December 18, 2025 21:06
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the space app container health status issue by adding the missing curl package required by the HEALTHCHECK command and correcting the health check endpoint from / to /spaces/ to match the application's configured base path.

Key changes:

  • Added curl and libc6-compat packages to the Alpine base image
  • Updated HEALTHCHECK command to use /spaces/ endpoint instead of root path

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.


HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -fsS http://127.0.0.1:3000/ >/dev/null || exit 1
CMD curl -fsS http://127.0.0.1:3000/spaces/ >/dev/null || exit 1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Hardcoded healthcheck path ignores configurable base path

The healthcheck path /spaces/ is hardcoded, but VITE_SPACE_BASE_PATH is a configurable build argument (default /spaces) that determines where the application serves content. If someone builds with a custom --build-arg VITE_SPACE_BASE_PATH="/custom-path", the application would be built to serve at /custom-path/ while the healthcheck still checks /spaces/, causing the container to be incorrectly marked as unhealthy.

Fix in Cursor Fix in Web

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 081dde4 and 0b3a29f.

📒 Files selected for processing (1)
  • apps/space/Dockerfile.space (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: check:types
  • GitHub Check: check:lint
  • GitHub Check: Cursor Bugbot
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
apps/space/Dockerfile.space (2)

81-82: LGTM! curl installation is correctly placed in the runner stage.

The curl package is appropriately installed in the runner stage where it's needed for the HEALTHCHECK, avoiding unnecessary bloat in the intermediate build stages. Using --no-cache keeps the image size minimal.

Note: The PR description mentions adding curl to the "base stage," but the implementation correctly places it in the "runner stage," which addresses the concern raised in the previous review.


92-92: LGTM! HEALTHCHECK path correctly updated to match the app's base path.

The health check now queries /spaces/ which aligns with VITE_SPACE_BASE_PATH="/spaces" (line 44), fixing the 404 errors that were marking the container as unhealthy. The use of 127.0.0.1 and curl flags -fsS are appropriate for health checking.

Comment on lines +81 to +82
RUN apk add --no-cache curl

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if other Plane Dockerfiles use libc6-compat and where they install it

echo "=== Checking libc6-compat usage in other Dockerfiles ==="
fd -name 'Dockerfile*' -type f | xargs rg -n 'libc6-compat' || echo "No libc6-compat found"

echo ""
echo "=== Checking Dockerfile.space content ==="
cat apps/space/Dockerfile.space | head -100

echo ""
echo "=== Checking for package.json in space app ==="
fd -path '**/space/package.json' -type f

Repository: makeplane/plane

Length of output: 4098


🏁 Script executed:

#!/bin/bash
# Find and check space app package.json

echo "=== Finding space package.json ==="
find . -path '*/apps/space/package.json' -type f

echo ""
echo "=== Checking space package.json dependencies ==="
if [ -f "apps/space/package.json" ]; then
  cat apps/space/package.json
else
  echo "File not found at expected location"
fi

Repository: makeplane/plane

Length of output: 2549


Add libc6-compat to the base stage for consistency with other production Dockerfiles.

libc6-compat is missing from Dockerfile.space but present in all other production Dockerfiles (web, live). This is also already included in Dockerfile.dev (line 3). Add it to the base stage after line 8 (RUN corepack enable pnpm) to ensure consistency across the codebase and follow Alpine + Node.js best practices.

🤖 Prompt for AI Agents
In apps/space/Dockerfile.space (around lines 8 and 81-82), the base stage is
missing libc6-compat which other production Dockerfiles include; add
libc6-compat to the base stage by inserting a RUN apk add --no-cache
libc6-compat (or add it to the existing RUN apk add --no-cache curl line)
immediately after the RUN corepack enable pnpm line to match the project
standard and Alpine+Node best practices.

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.

1 participant