-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment
Joël Deffner edited this page Jul 17, 2026
·
1 revision
Production runs on a university Apache server at https://team11.wi1cm.uni-trier.de/public/. There is no separate deployment pipeline: the SPA build is committed to the repository and served alongside the CodeIgniter API from the same origin.
cd frontend && pnpm build- Runs
tsc -b, then Vite compiles the SPA intopublic/(outDir: '../public',emptyOutDir: falseso CodeIgniter'sindex.phpand.htaccesssurvive). - The Vite
baseis/public/for builds, matching the production URL path. In dev it is/. -
Built assets are committed. A frontend source change only reaches the served app after
pnpm build(and a commit/push).
public/ is both CodeIgniter's document root and the SPA's output directory. Apache dispatches:
| Request | Result |
|---|---|
api/*, media/*
|
rewritten to CodeIgniter's index.php (the JSON API) |
| an existing file (hashed JS/CSS bundles, images, favicons) | served directly |
any other path (/meets/3, /admin/dashboard, ...) |
falls through to index.html; React Router resolves it client-side |
CodeIgniter stays a pure JSON API; it renders no HTML pages.
Because the app lives under the /public/ path (not at the domain root):
- React Router runs with
basenamederived fromimport.meta.env.BASE_URL(seefrontend/src/App.tsx). - The API wrapper prefixes every request path with the base (
/public/api/...). Without the prefix, the root.htaccessanswers with a redirect that turns a POST into a GET, producing confusing 404s (documented infrontend/src/lib/api.ts).
-
.env(copied from theenvtemplate, not committed) holds the environment:database.default.*credentials for MariaDBdb_team11, and any base-URL overrides. - Sessions are file-based via Shield;
writable/must be writable by the web server (logs, cache, session files). - Database setup on a fresh server:
php spark migrate --all, then the seeders as needed (see Database).
-
cd frontend && pnpm build(confirmtscpasses). - Commit the changed source and the regenerated
public/assets. - Push / pull on the server.
- If migrations were added:
php spark migrate --allon the server. - Smoke-test: load
/public/, log in, hit a deep link like/public/meets, and callGET /api/ping.
FlightMeet
Code
Reference