| | |
| | | |
| | | Production consists of **three parts** that may change independently: |
| | | |
| | | | Part | Location | Updated with | |
| | | |------|----------|--------------| |
| | | | Part | Location | Updated with | |
| | | |----------------------|----------------------------------------------|--------------------------------| |
| | | | Node.js REST service | the project dir on the server, run via `pm2` | code + `npm install` + restart | |
| | | | Frontend (Vue SPA) | `vue/dist` (built, **not** in git) | `npm run build` | |
| | | | PHP component | `$ILIASBASEDIR/globus-ilias-rest` | `copyPhpHati` | |
| | | | Frontend (Vue SPA) | `vue/dist` (built, **not** in git) | `npm run build` | |
| | | | PHP component | `$ILIASBASEDIR/globus-ilias-rest` | `copyPhpHati` | |
| | | |
| | | A full update therefore touches all three; a code-only change may only need the |
| | | first two. |
| | |
| | | - note the current git revision (`git rev-parse HEAD`) or tag |
| | | - the settings are in git, but keep a copy of the server's |
| | | `settings.prod.json` if it was modified on the server |
| | | 3. **Do not commit secrets**: `settings.prod.json` and `php/globus-ilias-rest/token` |
| | | contain tokens/credentials. Treat them as secret. |
| | | |
| | | ## Update steps |
| | | |
| | |
| | | # service version |
| | | curl https://www.lernen-mit-globus-baumarkt.de/popcorn/api/version |
| | | |
| | | > The `/api/version` endpoint must return the version from `package.json` |
| | | > (e.g. `{"version":"0.4.0"}`). If it differs, the deployed code is not the |
| | | > revision you expected — check the update/restart steps above before |
| | | > continuing. |
| | | |
| | | # authenticated API |
| | | curl "https://www.lernen-mit-globus-baumarkt.de/popcorn/api/user?token=$TOKEN" |
| | | |