How to deploy and test docker container websites using Azure app service

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi so in today's video I'm going to be going over how you can deploy container apps or websites using Docker and Azure now if you familiar with Docker it's a nice easy way to kind of pull and develop um a lot faster without having to worry about uh your environment on your computer or someone else's computer being different because it containerized all the resources and things you need for that app to work so with that we're going to go ahead and try and deploy a website uh using azers App services to then go ahead and test that out so if you're familiar already or not you would go to Hubs hub. deer.com and you can essentially search for whatever you're looking for so let's say you're an it and you're looking to test out some different IP address management servers so you can you know type in ipan just kind of see what comes up so there's some different things and if there's a certain one we're going to try one called PHP I pan that's one that I'm familiar with here so and typically I usually try to go for the ones that have the most downloads cuz typically those are the ones that kind of are being used the most so I'm going to go here and they have what are called compos files so doer comp posst files are kind of ways to automate um what needs to be ran whenever your whenever this gets uh built so you can take this and you need to put it in a yaml file format I'm going to copy all of this here and copy that and I'm going to open up my VSS [Music] code and close up some of this here so I'm going to create a new folder here my documents new folder called I can open that up uh we'll figure that out later so now in here I'm going to create a new file and we're just going to call it ian. now we going to paste all everything in there and usually you want to go through and just kind of see if it requires you to enter any any you know credentials or something in so here database password I'm just going to put um admin 2022 obviously you want to make that a little more secure then go down here and change this one off also down here to admin 2022 and then for root password we need to put in a a password here as well for the database and then that looks like it so yeah I don't see anything else here so now I'm going to go ahead and save this and now what we can do is say this is something we want to develop put in um a website and they have ons for like WordPress so let's you know if you're looking to do a WordPress site you take the official WordPress uh um Docker container and run that up there in the cloud as well so now if you're not if you don't have much Azure experience the great thing about this is it's a lot it's really um simple there's some kind of uh um knowledge of what's kind of going on a little bit to kind of make it more seamless but you can essentially go to create resource and just put in web app here and we're going to go subscriptions pay as you go Resource Group we can create a new one so let's go ahead and call this IAM and hit okay in Resource Group is just essentially a way to kind of um group resources that have a similar uh life cycle so for the DNS name um this you know has to be kind of unique so it's not available so we're going to go ipan 2022 and then that's available so what this will be is like the DNS name that you use to access your website so then we're going to go Docker container and then Linux and then we're going to go let's see our Linux plan so we can change this to be we want to do just Dev test and we're just going to do like you can do like a free there's like a I think this one's free yeah so this one's free um gives you just a couple days um minutes a day to compute to test it and then you can go with one that kind of gives you some more availability as far as the amount of resources and things like that and that typically actually works for like a lot of low low needed testing and stuff like that so if you're just testing something out or running something that doesn't require a lot of resources that's a good uh plan to start with then we're going to go next to our Docker section and we're actually going to do a Docker compos then we're going to do Docker Hub and then it's going to be public so the aess type if it's public or private depending on the uh the repository and then you're going to check your configuration files so we're going to go back into that documents folder and then choose that yam configuration and then hit go to networking and then this some of this stuff is like you know um it says can this web can be provisioned with the inbound address being public to the internet or isolated to the azal virtual Network so if you just want to have this like isolated to a virtual Network that's built within your environment you can do that but we're going to have this actually um accessed to the world here and then I'm just going to delete it when I'm done and then we're not going to worry about that or worry about tagging and let go ahead and review and create so this is everything that's going to be created now this takes a little bit now when it runs it's actually going to have to deploy not only the app plan and the app service but it's going to need to D um um anything that was mentioned in this file here it's going to need to pull this image expose these ports set these environment variables then it's going to you know um restart unless stop stopped then you got some volumes being created now this depends on the Maria DB which is down here so the mar DB is going to grab the latest one from Docker it's going to set this environment variable and then create these volumes and then also we have our Cron job and this sets to um you know scan inter RS and stuff like that so all this is going to be needed to be done and dependent on the resources it could take a little bit of time so this is actually finished here but if we go to the resource we should get a website so you can see where it says IAM 2022 azurewebsites.net if you want you can go into the let me click on where is that here configuration it should it might take some time to come up so see you're going to see like the different um envir connection strings and stuff like that in here some other stuff like FTP uh FTP then there's also an area where you can configure um networking if you want to restrict it to like specific IP addresses you can do that in here so you want to only uh allow it from say your home network of some sort but oh so we go back to the resource and we try to access it it may not come up so let's just double check here sometimes it takes a little bit time to actually get the DNS populated out to the internet which is is probably going to ride um a Microsoft's um DNS and then propagate it out to where you're at and then also o all the other stuff that gets needed so once this comes up then we'll go ahead and go from there okay so now we got the PHP installation started and this is running from aers uh websites. net um DNS name so now if we walk through the installation automatic database installation the username it's going to be root then the password it's still it's still on my clipboard there's that there and then install then continue and then I believe the password admin or actually this is I'm just going to use the same password for the website here and proceed to log in I think it's add or it's admin for the username default yep and now that's it in less than almost 10 minutes we have a fully functioning website in Azure tested from Docker so it's like I said it's a good way to kind of test different images if you kind of don't have a Docker environment set up or you just want to try some different um applications in the cloud whether it be for home private or corporate use that's a great way to try it out again if you have any comments in regards to how this is set up or anything that needs changed or questions in regards to a Docker just go ahead and drop me a comment down below be sure to help you out where I can again thanks for tuning in hope to see you next time
Info
Channel: LetMeTechYou
Views: 7,245
Rating: undefined out of 5
Keywords: docker, azure app service
Id: Fl9AIKj8UAY
Channel Id: undefined
Length: 10min 36sec (636 seconds)
Published: Sat Oct 22 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.