How to deploy your Docker Application to Azure Container Instance using GitHub Actions [CICD]
ฝัง
- เผยแพร่เมื่อ 6 ต.ค. 2024
- Code: github.com/ped...
Deploy Container Docs: learn.microsof...
Connect Azure AD to GitHub Actions: learn.microsof...
Create a service principal via CLI: learn.microsof...
Create Federated Credentials: learn.microsof...
#cicd
#githubactions
#docker
#devops
Awesome work, 🎉🎉🎉🎉
Thanks !!!
Hi sr. Amazing tutorial, thanks!!! I have a question. My app needs some environment variables as db_host, passwords, etc... How do I can set up this in the yml? Thanks in advance!
You can create an environment variable in your Dockerfile. Here is an instruction by using ARG or ENV refine.dev/blog/docker-build-args-and-env-vars/#:~:text=The%20ARG%20arguments%20are%20only,both%20dockerfile%20and%20docker%20compose.
@@pytalista Hello! Thanks for the great video. I have question how do we have to use env file instead of args and implicitly mentioning in the docker file. I am using the Azure web app for container service and my app thorws env file not found all the time but not sure how to setup those in azure.
@@learnsomething7838 It does matter as long as your code can access the environment variable independent of the method you use to "inject" those variables
@@pytalista Thanks for the reply. I figured it out.
For those who want to inject the environment variables to the azure web app for containers, the app settings in the configuration of the web app container in azure are injected as the environment variables at runtime.
Thank you so much for the reply :)