desec-stack icon indicating copy to clipboard operation
desec-stack copied to clipboard

feat(webapp): Make API_URL changeable and improve README

Open andreasnuesslein opened this issue 5 years ago • 5 comments

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

andreasnuesslein avatar May 27 '20 20:05 andreasnuesslein

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?

peterthomassen avatar May 28 '20 09:05 peterthomassen

Thanks, @andreasnuesslein. Enabling contributors to circumvent the whole docker setup is a really good idea!

I have a couple of suggestions:

  1. Persist the .env file in the repo -- I confirmed it will not interfere with the docker-setup
  2. Add the remaining env variables to webapp/.env to fix some missing email addresses and the like in the webapp. I tried locally
    VUE_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]
    
    Maybe add a note in docker-compose.yml that extending the list of environment variables requires changes to webapp/.env.
  3. Introduce an additional env variable, e.g. VUE_APP_NO_DOCKER=1 that automatically switches the hot reload backend (or switch depending on API_BASE_URL). (Using the wrong hot reload backend gives misleading error messages in the browsers console.)

nils-wisiol avatar May 28 '20 10:05 nils-wisiol

@andreasnuesslein ping :-)

peterthomassen avatar Jul 03 '20 15:07 peterthomassen

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.

andreasnuesslein avatar Jul 10 '20 10:07 andreasnuesslein

closed accidentally during master branch rename

peterthomassen avatar Apr 14 '21 11:04 peterthomassen

Superseded by #609

nils-wisiol avatar Aug 13 '22 14:08 nils-wisiol