front: add automation via .gitlab-ci.yml front-build and front-deploy-to-toolforge, update toolforge front doc.
Achievements
One commit with 7 files changed. This makes :
- Gitlab .gitlab-ci.yml
- builds to temporary gitlab
front/dist/works - deployment to toolforge
front/dist/works
- builds to temporary gitlab
Routing
Routing is handled on toolforge's www/python/uwsgi.ini.
-
lingua-libre.toolforge.org/index.htmlrouting works / is correct, vue js initiated (page still blank) -
lingua-libre.toolforge.org/assets/**/*.*routing works / is correct - lingua-libre.toolforge.org/api/ backend API still works.
Pushing furhter routing changes in this uwsgi.ini, it "seems" (???) possible to route all three :
-
/: static website -
/app/: front end recording app -
/api/*: backend API
If so, the only question left is the question of sufficient memory for Lingua Libre's data.
Changes explainers
- Update .gitlab-ci.yml with front-build and front-deploy-to-toolforge to remote toolforge
- Update .gitlab-ci.yml rsync to bypass failures : verbose -> -q quiet ; --no-perms change ; no timestamp directory since "Toolforge restricts permission changes on shared directories", etc.
- Add
/front-end/dist/directory to receive built files - Update .gitlab-ci.yml : must loggin as "lingua-libre" group to access and run web service
- Expand env to add toolforge configurations
- Update toolforge documentation with relevant completed
- Allow build with sourcemap for Vue dev extension
Remains
For some reasons the Vuejs stops midway, but on localhost... this works if a server is launched and proper port is opened
On your computer:
cd ./front-end/dist/
npm run build:toolforge # build: locally
# Open to see fails: http://0.0.0.0:5555/ or any port <path-to-file>/dist/index.html
# Open to see froze on `id="app"`: http://127.0.0.1:8080/ or http://127.0.0.1:8080/index.html or file:///home/yug/Documents/lingua-libre/front-end/dist/index.html
python3 -m http.server 5555 # run local server. Note: http served, https not.
# Open to see fails (Unable to connect): http://127.0.0.1:8000/ or any other port
# Open to see froze on `id="app"`: http://127.0.0.1:8080/ or file:///home/yug/Documents/lingua-libre/front-end/dist/index.html
# Open to see froze on `<main>`: http://127.0.0.1:5555/index.html
# Open to see succeed: http://0.0.0.0:5555/ or http://127.0.0.1:5555/
So:
- Horay ! The built code is correct.
- How to reproduce this last success but on Toolforge ?
Solutions ?
Create one distinct web server per service (???) :
| Service | Repository | Server | Server exists ? |
|---|---|---|---|
| Back-end (db API) | lingua-libre | Toolforge: $become lingua-libre | Yes |
| Front-end (vuejs studio) | lingua-libre | Toolforge: $become lingua-libre-app | Not yet |
| Lingualibre.org (vuejs site) | lingua-libre | WMFR>lingualibre | Yes |
See also
- Phabricator task: T387117
- Merge Request: MR44
- Reproducible documentation: doc/toolforge-deployment.md#Front
- Files changes : diffs