- Install flyctl: https://fly.io/docs/hands-on/install-flyctl/
- Run
fly auth login
cd apps/patient-platform/patient-api
fly launch --no-deploy # if first time; accepts defaults/app name
fly deploy --remote-only --now
The service listens on internal port 8000. Public HTTPS is exposed on 443.
cd apps/patient-platform/patient-server
# fly.toml points BACKEND_URL and API_BASE to the backend via private DNS
fly launch --no-deploy # if first time; accepts defaults/app name
fly deploy --remote-only --now
This serves static web and proxies /api and /api/chat/ws to the backend.
- In
apps/patient-platform/patient-server/fly.tomlthe backend URL is set tohttp://oncolife-patient-api.internal:8000which resolves over Fly’s private network. Ensure the backend app name matches the one you deployed (or update the hostname accordingly).
- Frontend/gateway:
BACKEND_URLandAPI_BASEare set infly.toml. Adjust if you change the backend app name or port. - Backend: set your Cognito envs (
AWS_REGION,COGNITO_USER_POOL_ID,COGNITO_CLIENT_ID) viafly secrets set KEY=VALUEif needed.
infrastructure/scripts/redeploy-frontend.shinfrastructure/scripts/redeploy-backend.sh
These call fly deploy from the correct directories.