-
Notifications
You must be signed in to change notification settings - Fork 1
Deploy app on azure
Enter the azure homepage, go to virtual machines and hit the create button.
Now lets configure the machine properly, this is very important as picking the wrong options here will result in your free credits disappearing. Choose the Standard B2s virtual machine as it is the cheapest one that will run properly.
Now choose the ubuntu server 20.04 image and leave all the other settings as given by default
Download the keypair, and store it safely (In case of loosing it you wont be able to connect to the machine)
Now lets connect to the machine to install the necessary dependencies (Since everything runs on top of docker we only need docker :D). Lets connect using the windows SSH client with the command
ssh -i mykey azureuser@ip
If you are not sure what is the ip of your machine head over to the azure portal, go to the virtual machine and the ip should be right there
So lets connect to the machine
First of all we have to update the machine
sudo apt update && sudo apt full-upgrade
Now that we have an updated machine the only remaining step is to install docker
sudo apt update && sudo apt install apt-transport-https ca-certificates curl software-properties-common && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" && sudo apt update && sudo apt install docker-ce && sudo usermod -aG docker ${USER} && sudo curl -L "https://github.com/docker/compose/releases/download/1.28.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose && sudo systemctl status docker
After running the command we should see something like this
Go to secrets actions link
And now we have to set the correct tokens for the deployment to work
- DEPLOY_HOST -> The IP of your machine
- DEPLOY_KEY -> The key you used to connect over SSH
- DEPLOY_USER -> Your machine user (If you didnt change anything it should be azureuser)
WIQ ES1C - Thanks for your attention!