Deploy via systemd + fix duplicate provider appointment cards#51
Open
pierzchala-m wants to merge 7 commits into
Open
Deploy via systemd + fix duplicate provider appointment cards#51pierzchala-m wants to merge 7 commits into
pierzchala-m wants to merge 7 commits into
Conversation
Booked appointments and the busy slots they consume were both rendered, showing every appointment twice (a 'Blocked' card and a 'Busy' card). Suppress slots referenced by an appointment's slot[] or sharing its start/end so each booked time appears once. Free/unbooked slots are unaffected.
Add deploy/fhirtogether.service to run the compiled Node.js server (node dist/server.js) directly under systemd, reading config from .env. Document install/update/log commands in QUICKSTART, reference them from README and copilot-instructions (DRY). Docker files remain for local use.
…y systemd) Production now runs as a host-local systemd service updated manually, so the launchpad/Docker auto-deploy on push (deploy-production.yml) is obsolete and conflicting. Removed it and clarified in copilot-instructions that prod deploys are manual; pr-preview.yml still uses Docker for ephemeral PR previews.
There was a problem hiding this comment.
Pull request overview
This PR updates FHIRTogether’s production deployment documentation/artifacts to run the compiled Node.js server under systemd, and fixes a scheduler provider-view UI issue where booked times were rendered twice due to both Appointment and underlying Slot entries being displayed.
Changes:
- Add a systemd unit file and document install/update/log commands for non-Docker production deployment.
- Update top-level docs to point to the new deployment instructions.
- De-duplicate timeline rendering in the provider appointment list by suppressing slots consumed by appointments.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds a short note linking to the new systemd deployment docs/unit. |
| QUICKSTART.md | Adds a “Deploy with systemd” section with install/update/log instructions. |
| packages/fhir-scheduler/src/components/AppointmentList.tsx | Suppresses slots that are consumed by appointments to prevent duplicate cards. |
| deploy/fhirtogether.service | Introduces the systemd unit to run node dist/server.js in production. |
| .github/copilot-instructions.md | Documents systemd deployment approach for Copilot context. |
The reset flow now stops/starts the fhirtogether systemd service rather than the (removed) docker compose stack, matching the systemd deployment model.
The 'Delete failed container' step crashed when the launchpad API returned a non-JSON body (jq parse error -> exit 5 under bash -e). Guard the jq calls so a bad response yields an empty value instead of aborting the preview build.
…anup" This reverts commit fece602.
Collaborator
Author
|
failing check due to mieweb/launchpad#18 |
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
Two changes from this session:
1.
feat(deploy): run the server under systemd instead of DockerProduction now runs the compiled Node.js server (
node dist/server.js) directlyunder systemd, replacing the previous Docker Compose deployment.
deploy/fhirtogether.service(Type=simple,Restart=always, reads.env).QUICKSTART.md.README.mdand.github/copilot-instructions.md(DRY — no duplicated command blocks).Dockerfile/docker-compose.ymlare kept for local containerized runs;docker-compose.inferno.yml(Inferno harness) is untouched.Applied on the host: old
restart-app.service(docker compose wrapper) disabled, container removed, DB ownership restored from root to the service user, new unit installed/enabled. Verifiedactive (running),/health→{"status":"healthy","store":"sqlite"},/scheduler/provider-view.html→ HTTP 200.2.
fix(scheduler): de-duplicate booked slots in the provider appointment listBooked appointments and the busy slots they consume were both rendered, so every
booked appointment showed twice (a "Blocked" card and a "Busy" card). The timeline
now suppresses any slot referenced by an appointment's
slot[]or sharing itsstart/end. Free / unbooked slots are unaffected. Verified live in the provider view.
Test plan
npm run buildsucceeds