Very much new to azure. Running containers in a swarm on our servers currently and looking to move to azure. We have a legacy app which we have containerised and to make it as useable as possible, we want to load the config.js in much like we do with docker swarm and docker configs. For the life of me I cannot work out how to achieve injecting a file into the container. We are using a webapp containers. Any hints from anyone on what feels like it should be a simple thing to do?
I'm guessing your file is environment specific, so you have different ones for dev, test, etc.
The typical path would be to convert these to environment variables, and then validate them through kudu/scm. https://<app>.scm.azurewebsites.net/Env Changing environment variables doesn't trigger a container restart, like many update or redeploy operations will.
You have the option to enable persistent storage (/home) and put shared files there, but this might require app changes.
Since you have a container, you can add the file to the image, or as part of a deployment pipeline.
Lastly, you can use the kudu (/scm) endpoint to upload files, but I would stay away from this.