A few questions about the "--dev" mode

Hello everybody,

i have a few questions about customizing the webodm code.
I’ve made a few changes to the code (e.g. using local map server as basemap).

First Question:

I have no trouble using these changes when starting webodm with the “–dev” flag. I’m using the docker version btw. But how can i make these changes into the production? Every readme i read sounds like i can simply make the change to the repository and issue a “webodm.sh restart” but it doesnt work this way. Do i have to copy the files into the docker container?

Second Question

This question is maybe related to the first one and some missunderstanding on my side. First of all the server i am running webodm on has no internet connection. When i start webodm in “–dev” mode it fails to start. So what i had to do is manually installing a missing pip package (rio-tiler). I also encounter other errors such as corrupted session data.

Why is that? I thought the docker container is the same. And the only different would be the always up-to-date repository files?

Thanks everyone for the great tool and your help!

Why is that? I thought the container is exactly the same but it simply uses the

The container is the same, but the /webodm directory is replaced with the user’s filesystem in --dev mode. To bring the changes in “production”, you need to rebuild the container.

docker build -t opendronemap/webodm_webapp .

Then ./webodm.sh restart.

1 Like

Thank you pierotofy,

i have a following up question:

because i dont have an internet connection on that server i have trouble rebuilding it.
So i decided to simply copy the Basemap.js to the container and commit the change to the image.
Which works well, i can confirm the file has been changed (via file explorer). Except i don’t see the change in my browser.

I found 2 locations of the Basemap.js file inside the container:

build/static/app/js/classes/
app/static/app/js/classes/

if i replace both locations with my own Basemap.js file i still can not see the changes in my browser.
Is there another location where the files is stored?

Thank you very much!

You’ll need to re-run the webpack --mode production command from /webodm to rebuild the javascript files within the container for the changes to apply.

I am sorry, i have to ask a follow-up question, because i can not get it to work.
I tried it, as you suggested with the webpack --mode production inside the container.

It seems to kind of work but produces a few “undefined entrypoint” errors.
After refreshing the webpage the dashboard page is blank. Administration and diagnoses page works fine, just as before.

This also happens if i dont change anything at all and just run the webpack --mode production command.

Any idea what i am doing wrong?

Thanks a lot!

i resolved to issue.

The dashboard was blank because the server couldnt find the generated files. They change theire name every build with a hash value.

I had to copy the new generated bundle files into the build bundle folder. It was a little bit confusing because i expected webpack to generate the files into the build folder, which it doesnt.

Thanks everyone!

2 Likes