In a previous post I walked you through how to get apache superset up and running together with Azure Database for PostgreSQL and Azure Redis Cache.
In this post I will walk you through getting the superset container up in Azure App Service for linux. I will explain to you the following steps:
create an Azure App Service for Linux based on a docker-compose file
map storage to you app service and use it in your container. This is a new feature for app service
First, we will need to create an app service plan, and a webapp.
This second line will create a web app in Azure based on your docker-compose file. The docker-compose file looks like this:
(As you can notice in the docker-compose file I switched to my own docker container, that I published to docker hub. The only change I made here was an updated version of the werkzeug library. I switched this to version 0.14. I needed this update somewhere along the way, but I can’t remember what the error was I was trying to fix.)
This setup works, more or less, however, notice the volume mapping which is in there. This will not work in app service, since the superset_config.py file is not there. So the superset service will have no config to start from. To fix this, we can map a storage container to our app service.
Now that we have a storage container with our superset_config.py file, we can associate this container to our app service.
The tricky parts of this command are:
–share-name: which can also be a storage container name, so here use the name of your storage container you just create
–mount-path: use the same as the path where you want it to end up in your container
–custom-id: you will later use this id in your docker-compose file
Now you can alter your docker-compose file to use this storage:
So in the volumes parameter, you use the –custom-id and the –mount-path again.