Deployment and Hosting
Same-Stack Documentation Hosting
The docs site is part of the API service, not a separate public service.
Production path:
- Docusaurus builds static assets during the Docker image build
- built files are copied to
/opt/fastapi-mapserver-docs - FastAPI mounts that directory at
/guide
This means the documentation is served through the same public host and Traefik routing as the API.
Deployment Files in This Repository
| File | Purpose |
|---|---|
local-stack.yml | current local swarm deployment profile |
stack.yml | swarm deployment variant |
reload_stack.sh | local redeploy helper |
Local Swarm Profile Notes
The active local profile includes:
- Traefik HTTP to HTTPS redirection for the public host
- tuned API, Celery, and MapCache limits for the current Xeon-class machine
wms_use_mapcache=true- Celery recycling defaults at 4 tasks or about 1 GiB per child
- local Apache tuning through
mapcache-tuning.local.conf
Public Hosts
| Host | Purpose |
|---|---|
ogc-service.wps.met.no | API, frontend, docs, WMS, WCS |
mago-terrain.wps.met.no | public Cesium terrain hosting |
Validation Checklist After Deployment
curl https://ogc-service.wps.met.no/health
curl https://ogc-service.wps.met.no/docs
curl https://ogc-service.wps.met.no/ui/
curl https://ogc-service.wps.met.no/ui-react/
curl https://ogc-service.wps.met.no/guide/
curl https://ogc-service.wps.met.no/guide/blog
Why the Docs Are Not a Separate Service
Keeping the docs in the API container has practical advantages here:
- no extra Traefik router or TLS surface
- no duplicated deployment lifecycle
- docs version always matches the running API image
- local swarm bind mounts do not overwrite the final built docs because they live outside
/app