0

I'm trying to as much of my CI/CD process automated. Here is what I've got at this point:

  • Azure App Service using a docker container.
  • Azure DevOps code repository.
  • Right now using Docker Hub as the repo for my docker container. Can move to Azure later.

I can push code to the repo, it builds the new image, pushes it to Docker Hub, once thats done it gets deployed to the Azure App Service just fine.

Where I'm running into issues is we have a Laravel app that is being deployed via this container. With Laravel there is an .env file that I don't want to push up to the code repository. How would one go about moving a file into the container once it's been deployed?

All I've been finding is how to do it via SSH or through the startup command, but all the examples assume the file is on the image.

Thanks for any tips/tricks/links/etc!! I've got a feeling this is one of those "ahh that was easy" things and what I'm searching just isnt the right verbiage.

Silent
  • 438
  • 2
  • 6
  • 19
  • 1
    This isn't an exact duplicate, but you want to mount that file [as a volume](https://stackoverflow.com/q/64019780/7867968). That way, you can push the `.env` to a storage account and not bake it into your image – C.Nivs Nov 08 '22 at 22:53
  • 1
    [This example](https://stackoverflow.com/q/58878134/7867968) might be a bit closer to what you're looking for – C.Nivs Nov 08 '22 at 22:55
  • @C.Nivs this might be exactly what I was needing. I'll try it out in the morning but I suspect it should be that easy. – Silent Nov 09 '22 at 01:17

0 Answers0