unlock dev setup, add service healthchecks, fix compose mounts - #97
Closed
Rajaykumar12 wants to merge 1 commit into
Closed
Rajaykumar12 wants to merge 1 commit into
Rajaykumar12 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses three findings from the hosting readiness audit: a fresh clone couldn't start
the dev stack,
server/clienthad no restart policy or healthcheck in production, andAPP_ROOTsilently installed to the wrong place.Changes
Dev setup
server/.env.exampleandclient/.env.example.client/.envin particular needsBACKEND_URL=http://localhost:8080— the built-in defaulthttp://server:8080is aDocker-network name that doesn't resolve on the host.
CONTRIBUTING.mdStep 1–2: explain what each of the three env files is for, andreplace the stale compose command (which referenced the deleted
seedservice) withpnpm install && pnpm dev.Health and resilience
GET /healthon the API, returning 503 until Mongo is connected.restart: unless-stoppedonserverandclient, matchingmongoandcaddy.serverandclient;caddyandclientnow gate oncondition: service_healthyinstead of start-order, so Caddy can no longer proxy to aNext.js that isn't listening yet.
APP_ROOTenv_filepaths resolve${POMELO_ROOT:-/opt/pomelo}instead of hard-coding
/opt/pomelo. Default behaviour is unchanged.ComposeCommandpassesPOMELO_ROOT: paths.rootto compose;install.shdoes the sameon uninstall teardown, and exports
NODE_ENV=productionin the systemd-less fallback soa relocated install doesn't trip the dev-mode heuristic.