ModischFabrications / CutSolverFrontend

Simple frontend for CutSolver, a webservice to determine ideal cut placements
https://cutsolver.modisch.me
GNU General Public License v3.0
10 stars 2 forks source link

get the env vars into vue #10

Closed ModischFabrications closed 4 years ago

ModischFabrications commented 4 years ago

process.env works only in node, but is fixed after build.

this means that you need to either set the env vars on build (recommended, but stupid in regards of a reusable prebuild docker image) or use a weird substitution bash (hacky, but should work on startup).

https://stackoverflow.com/questions/21866477/nginx-use-environment-variables

https://medium.com/@rakhayyat/vuejs-on-docker-environment-specific-settings-daf2de660b9

https://ledermann.dev/blog/2018/04/27/dockerize-and-configure-javascript-single-page-application/