Host the PWA and every static site on App Platform
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github-actions, python
- Domain
- cloud, devops, infrastructure
Research direction
Start with .do/sites.yaml and .do/production.yaml, then check DigitalOcean's current App Platform pricing and docs for the free tier requirements listed in the issue. Review the existing site build workflows and .nvmrc to confirm the build inputs and output paths. Done means both specs validate, the sites and PWA meet the listed hosting and routing criteria, and transfer monitoring is recorded; this work depends on #61, #62, and openpickleball/frontend#22.
Written by the indexing model from the issue text.
Description
Epic: #111
Problem: The backend is planned for DigitalOcean App Platform (#61, #62, #183), but OPEN's static sites are on GitHub Pages: the public site (openpickleball/frontend site/, at www.openpb.org) and the developer site (openpickleball/developers, at dev.openpb.org). The PWA (openpickleball/frontend app/, openpickleball/frontend#22) and the partner docs site (#184) have no host yet. Hosting is split across two providers, with two deploy paths, two places to manage domains and HTTPS, and no single cost picture. This issue moves every OPEN site onto App Platform, so the whole of OPEN deploys and is managed in one place.
Cost approach (multi-site workaround): App Platform's free static site allowance applies per app, not per static site. So every static site that does not need to share an origin with the API goes into one free app as separate static site components, as long as the app's combined outbound transfer stays within the free 1 GiB per month. The PWA is the exception: it must be served same-origin with the API (#182, #183), so it is a static site component of the production app.
Layout:
| Host | Source | App |
|---|---|---|
app.openpb.org |
openpickleball/frontend app/ (static build) |
production (.do/production.yaml, #61), with /api/, /_allauth/, /oauth/ routed to Django (#183) |
api.openpb.org |
this repository | production (#61, #183) |
openpb.org, www.openpb.org |
openpickleball/frontend site/ |
sites app (free) |
dev.openpb.org |
openpickleball/developers |
sites app (free) |
partner.openpb.org |
openpickleball/partner-docs (#184), once it exists |
sites app (free) |
status.openpb.org |
openpickleball/status (#139) |
stays on GitHub Pages, see Out of scope |
Tasks:
- Check the free tier against DigitalOcean's current pricing and App Platform docs, and record the findings here: that the free static site allowance and its 1 GiB transfer are per app, how many static site components one free app may hold, what happens past 1 GiB (overage price per GiB, or a cutoff), whether custom domains (apex included) are allowed on a free app, and what a static site component costs inside the paid production app
- Create
.do/sites.yaml: one app with a static site component per site in the table, each built from its own repository atmain, each with its custom domain. No secret values in the spec - Public site component: build
site/with pnpm (Node version from.nvmrc), outputsite/public. Keep/.well-known/funding-manifest-urlsserved atopenpb.org, and redirectwww.openpb.orgtoopenpb.orgas Pages does today - Developer site component: build with uv and Zensical (
uv sync --locked,zensical build --strict, outputsite). If App Platform's buildpacks cannot run this build, build it in GitHub Actions and deploy the output instead, and record which - Partner docs component: add it to the spec when #184 creates
openpickleball/partner-docs; until then, note the planned component in the spec - PWA component in
.do/production.yaml: the static build ofapp/onapp.openpb.org, with the catch-all route for client-side routing, next to the Django routes from #183. This needs openpickleball/frontend#22's adapter choice to be a static build - A custom 404 page and correct caching for each component (hashed assets cached long, HTML not cached), and the PWA's service worker and manifest served with the right headers
- DNS: move
openpb.org,www,dev, andpartnerfrom GitHub Pages to App Platform, with HTTPS on each. Check whether the apex domain needs DigitalOcean nameservers. Lower the TTLs before the switch so a rollback (pointing DNS back at Pages) is quick - Watch the sites app's monthly transfer against the 1 GiB limit, and set an alert (App Platform or billing) before it is reached. Add the sites app to the cost table in #61 and the README
- After each site has run on App Platform for a week with no problem, in each site's repository: remove the Pages deploy job (keep the build job and its name, since
teaser-buildandbuildare required checks onmain), turn off GitHub Pages, and update its README and CLAUDE.md. Open one issue inopenpickleball/frontendand one inopenpickleball/developersfor this - Update #182's ADR (or add a note to it) and #184 to say each site is served from App Platform, and which app
Acceptance criteria:
doctl apps spec validatepasses for.do/sites.yamland.do/production.yamlopenpb.org,www.openpb.org, anddev.openpb.orgare served over HTTPS from the sites app, with the same pages as on GitHub Pagesapp.openpb.orgserves the PWA from the production app, and its requests to/api/,/_allauth/, and/oauth/are same-origin (#183)- The sites app stays on the free tier: its findings and the expected monthly transfer are recorded in this issue, and a transfer alert is set
- The sites load while the production app is stopped
- GitHub Pages is turned off for
frontendanddevelopers, and no site is served from it
Out of scope:
- The status page (#139): it must keep working while OPEN is down, so it stays on GitHub Pages, outside DigitalOcean
- The backend's own components, databases, and deploys (#61, #62, #63)
- The PWA's adapter and build (openpickleball/frontend#22) and the partner docs site's content (#184)
Depends on: #61, #62, openpickleball/frontend#22 (for the PWA component)
Related: #182, #183, #184, #139
Size: M
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 206
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openpickleball/backend
-
area:infra documentation priority:p2 size:S
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openpickleball/backend#472 ·
Maintainers usually reply within 1 day
-
Show doctl's error when the Deploy workflow's update failsPossibly taken @GeoBradDev claimed this today. Openarea:infra bug priority:p2 size:S
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openpickleball/backend#471 ·
Maintainers usually reply within 1 day
-
area:infra documentation type:chore
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
openpickleball/backend#196 ·
Maintainers usually reply within 1 day
-
area:infra type:chore
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openpickleball/backend#195 ·
Maintainers usually reply within 1 day
-
area:api enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
openpickleball/backend#470 ·
Maintainers usually reply within 1 day
All issues in openpickleball/backend
Similar issues
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionErrorPossibly taken @jejjohnson claimed this today. Opentype:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jejjohnson/integrix#144 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
finos/ai-governance-framework#459 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
freelawproject/litigant-portal#1307 ·
Maintainers usually reply within 2 days
-
type/bug
Difficulty 1/5 Under an hour Newbie friendliness 86/100
h2oai/h2o-llmstudio#1163 ·
Maintainers usually reply within 1 day