feat(webapp): Make API_URL changeable and improve README
The API_URL needs to be set via the environment now. It should automatically be set by docker-compose.yml for the default scenario.
See #397
Thanks for this new PR, @andreasnuesslein!
In the code changes, VUE_APP_API_BASE_URL sometimes seems to refer to the full URL (https://desec.io/api/v1/), and sometimes just to the path (/api/v1/). It seems to me something is off - or am I misunderstanding?
Thanks, @andreasnuesslein. Enabling contributors to circumvent the whole docker setup is a really good idea!
I have a couple of suggestions:
- Persist the .env file in the repo -- I confirmed it will not interfere with the docker-setup
- Add the remaining env variables to
webapp/.envto fix some missing email addresses and the like in the webapp. I tried locally
Maybe add a note inVUE_APP_API_BASE_URL = "https://desec.io/api/v1/" VUE_APP_DESECSTACK_DOMAIN=io VUE_APP_DESECSTACK_NS=ns1.desec.io ns2.desec.org VUE_APP_DESECSTACK_API_SEPA_CREDITOR_ID=FOOBAR VUE_APP_DESECSTACK_API_SEPA_CREDITOR_NAME=FOOBAR VUE_APP_LOCAL_PUBLIC_SUFFIXES=dedyn.io [email protected]docker-compose.ymlthat extending the list of environment variables requires changes towebapp/.env. - Introduce an additional env variable, e.g.
VUE_APP_NO_DOCKER=1that automatically switches the hot reload backend (or switch depending onAPI_BASE_URL). (Using the wrong hot reload backend gives misleading error messages in the browsers console.)
@andreasnuesslein ping :-)
cough cough yeah I know :( I've been crazy swamped and I still kind of am at the moment. I still want to help and I hope better days will come. - Sadly that's all that I can offer at this moment.
closed accidentally during master branch rename
Superseded by #609