${WEBAPP_STORAGE_HOME} not working for docker-compose

Occasional Visitor

Hi,

 

I am trying to link mount a volume in docker-compose that must point to a file. I am thus unable to use the storage mount option. However when I try using ${WEBAPP_STORAGE_HOME} my docker build fails and I get the error:

 

" :( Application Error

If you are the application administrator, you can access the diagnostic resources."

 

The correct file is in the wwwroot folder.

 

Bellow is my docker-compose file:

 

version: "3.4"

services:
op-connect-api:
image: 1password/connect-api:latest
ports:
- "8080:8080"
volumes:
- ${WEBAPP_STORAGE_HOME}/site/wwwroot/1password-credentials.json:/home/opuser/.op/1password-credentials.json
- "data:/home/opuser/.op/data"
op-connect-sync:
image: 1password/connect-sync:latest
ports:
- "8081:8080"
volumes:
- ${WEBAPP_STORAGE_HOME}/site/wwwroot/1password-credentials.json:/home/opuser/.op/1password-credentials.json
- "data:/home/opuser/.op/data"

volumes:
data:

 

Thanks!

2 Replies

@Brett_Henning did you add the WEBSITES_ENABLE_APP_SERVICE_STORAGE=true setting in your Azure Configuration blade? that will allow the docker container to see the root of the app service (i.e. the stuff normally used to run your web app, e.g the files in site/wwwroot.

 

If you've got ssh access set up for your docker container, use the SSH blade in kudu/SCM to do a directory listing of /home/site/wwwroot which should now be mapped to site/wwwroot

@dombarnes thank you! Took me a while to get there but that is exactly what I needed to do.

 

If you go to you web app on Azure and click on Configuration under Settings, then on Add Application Setting. Set the name to WEBSITES_ENABLE_APP_SERVICE_STORAGE and the value to true. Now the docker file works.

 

Hopefully someone else might find this useful :smile: