Hi everyone. At the moment I am stuck with deploying a dash app to Render. In a nutshell:
-The app contains among other elements a px.scatter_mapbox
-Locally everything works. In the local environment the token for mapbox is stored in an .env file
-I am deploying the app with the help of dash-tools, where a “render.yaml” file is created
-In this file I added the mapbox key at the end…
-…and in app.py I added
-and use “mapbox_token” in the definition of the scatter plot.
The app will be deployed by Render and is functional, however the map does not show (except for the legend). Maybe I am not seeing the forest for the trees. Seems, the mapbox key is not properly recognized. Any help/ideas are appreciated. Thx, Peter
I would have probably done the same things you did and expected it to work. Maybe Render processes their env variables differently.
Try the Per-service Environment Variables method (points 1 to 3). That should work.
Thanks for hinting at the alternative method. Actually that was my first try, unfortunately without success. Funny thing is, that…
…not only the legend of the map is shown. There are also the tools in the top-right-corner on hover. The impression is, that something is there…
…and I got the app running with
But somehow one would like to mapbox styles! Let’s wait and see…
SOLVED! Ok, this was tricky…
-As said, I am deploying the app with the help of “dash-tools”, where a “render.yaml” file is created
-“dash-tools” creates the “render.yaml” file with the setting: “region: oregon”
-I changed this setting to “region: frankfurt” (DON’T DO THAT)
But as the RENDER docs say:
The region of a service cannot be changed once it’s created.
Seems this was the root of the problem!