organice icon indicating copy to clipboard operation
organice copied to clipboard

ORGANICE_WEBDAV_URL not getting inserted correctly

Open AblatedSprocket opened this issue 1 year ago • 1 comments

Hello!

I'm self-hosting Organice in a docker container. When I run it and go to sign in via webdav, I see the URL field populated with "ORGANICE_WEBDAV_URL" instead of the value. Sample command to reproduce:

docker run -d --name organice -p 5000:5000 -e "ORGANICE_WEBDAV_URL=https://my.webdav.com" twohundredok/organice:latest

The same occurs if I save the URL in an environment file and mount it to /opt/organice:

docker run -d --name organice -p :5000:5000 -v $PWD/docker/organice/.env:/opt/organice/.env twohundredok/organice:latest

Contents of $PWD/docker/organice/.env:

ORGANICE_WEBDAV_URL=https://my.webdav.com

And the same also happens if I build the container from a Dockerfile setting the environment variable:

FROM twohundredok/organice:latest

ENV ORGANICE_WEBDAV_URL=https://my.webdav.com

Hoping there's something simple I'm missing, seems like there typically is.

Thank you!

AblatedSprocket avatar Apr 23 '23 02:04 AblatedSprocket

Attempting to use my minimal Javascript familiarity to debug this as it also happens for me; something is off with this line: https://github.com/200ok-ch/organice/blob/8f349307a68dd98d6d90b5d609101cd449b5d393/src/components/SyncServiceSignIn/index.js#L22, or how it is output in the build process.

Looking at the compiled javascript inside the "official" docker container I'm running ((docker.io/twohundredok/organice:latest), it looks like this code doesn't actually pull the value from the environment variable process, but somehow places the variable name in literally

File name: /opt/organice/serve/static/jsmain.31d20f59.chunk.js r=Object(i.useState)("ORGANICE_WEBDAV_URL")

RobotDisco avatar Jul 04 '23 05:07 RobotDisco