Skip to content

unlock dev setup, add service healthchecks, fix compose mounts - #97

Closed
Rajaykumar12 wants to merge 1 commit into
masterfrom
dev-prod-fix
Closed

Rajaykumar12 wants to merge 1 commit into
masterfrom
dev-prod-fix

Conversation

@Rajaykumar12

Copy link
Copy Markdown
Collaborator

Summary

Addresses three findings from the hosting readiness audit: a fresh clone couldn't start
the dev stack, server/client had no restart policy or healthcheck in production, and
APP_ROOT silently installed to the wrong place.

Changes

Dev setup

  • Add server/.env.example and client/.env.example. client/.env in particular needs
    BACKEND_URL=http://localhost:8080 — the built-in default http://server:8080 is a
    Docker-network name that doesn't resolve on the host.
  • Rewrite CONTRIBUTING.md Step 1–2: explain what each of the three env files is for, and
    replace the stale compose command (which referenced the deleted seed service) with
    pnpm install && pnpm dev.

Health and resilience

  • New GET /health on the API, returning 503 until Mongo is connected.
  • restart: unless-stopped on server and client, matching mongo and caddy.
  • Healthchecks on server and client; caddy and client now gate on
    condition: service_healthy instead of start-order, so Caddy can no longer proxy to a
    Next.js that isn't listening yet.

APP_ROOT

  • Prod compose bind mounts and env_file paths resolve ${POMELO_ROOT:-/opt/pomelo}
    instead of hard-coding /opt/pomelo. Default behaviour is unchanged.
  • ComposeCommand passes POMELO_ROOT: paths.root to compose; install.sh does the same
    on uninstall teardown, and exports NODE_ENV=production in the systemd-less fallback so
    a relocated install doesn't trip the dev-mode heuristic.

@JustModo JustModo closed this Aug 14, 2026
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