chart.amow.com — FastAPI + Vue3 app
Find a file
2026-08-10 01:05:51 +00:00
bin Add /api/version and bin/wait-deploy so deploys are observable from any machine 2026-08-10 01:04:58 +00:00
static Scaffold FastAPI + Vue3 placeholder app with local docker compose stack 2026-08-09 23:34:01 +00:00
.gitignore Scaffold FastAPI + Vue3 placeholder app with local docker compose stack 2026-08-09 23:34:01 +00:00
docker-compose.yml Make local compose host port overridable; record Coolify UUID in README 2026-08-09 23:38:33 +00:00
Dockerfile.dev Scaffold FastAPI + Vue3 placeholder app with local docker compose stack 2026-08-09 23:34:01 +00:00
main.py Add /api/version and bin/wait-deploy so deploys are observable from any machine 2026-08-10 01:04:58 +00:00
Procfile Scaffold FastAPI + Vue3 placeholder app with local docker compose stack 2026-08-09 23:34:01 +00:00
README.md Correct rebuild timings in README with measured warm/cold numbers 2026-08-10 01:05:51 +00:00
requirements.txt Scaffold FastAPI + Vue3 placeholder app with local docker compose stack 2026-08-09 23:34:01 +00:00

chart

FastAPI backend + Vue 3 (from CDN, no build step) served at https://chart.amow.com.

Currently a placeholder: the frontend calls /api/hello and prints the JSON.

Local development

docker compose up --build

Then open http://localhost:8000. Override the host port with PORT=8010 docker compose up if 8000 is busy — on the VPS itself it always is, that's the Coolify UI. The source tree is bind-mounted and uvicorn runs with --reload, so edits to main.py or static/ take effect without a rebuild. Rebuild only when requirements.txt changes.

Without Docker:

python3 -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload

Layout

Path Purpose
main.py FastAPI app — JSON under /api, serves the SPA at /
static/ index.html, app.js, style.css — Vue 3 loaded from unpkg
requirements.txt Python deps
Procfile Start command; nixpacks needs this or the deploy has nothing to run
bin/wait-deploy Blocks until the live site serves your latest commit
Dockerfile.dev, docker-compose.yml Local dev only — production does not use them

Deployment

Push to main → Forgejo webhook → Coolify rebuilds with nixpacks → live. Rebuild time depends on whether Docker's build cache is warm: measured at ~20s warm (you pushed recently) and ~90s cold (the cache goes stale after an idle hour or so, which is the usual case). Nothing changes on the site until the new container swaps in at the very end, so the old version keeps serving for the whole build.

To know when your commit is actually live, rather than guessing:

git push && bin/wait-deploy

It polls /api/version (which returns the SOURCE_COMMIT Coolify bakes into the container) until it matches your local HEAD, then exits. Runs from any machine — no Coolify token, no SSH tunnel. Check by hand any time with:

curl -s https://chart.amow.com/api/version

One more trap worth naming: if your change only touches an /api endpoint, the HTML is byte-identical and a browser refresh looks like nothing happened even after a successful deploy. Verify the endpoint, not the page.

Two things to know before changing the deploy config:

  • The Coolify domain is registered as https://chart.amow.com:8000. The port suffix is how Coolify decides the Traefik target port; drop it and every request 502s while the container looks perfectly healthy. It does not appear in the public URL.
  • Ignore a 502 in the first minute after a deploy — that's the rolling container swap, and it clears on its own.

Manual redeploy:

curl -X POST -H "Authorization: Bearer $(cat ~/.coolify-token)" \
  "http://127.0.0.1:8000/api/v1/deploy?uuid=dgvch0xqv8uvjfor7dl8bwl9&force=true"