![]() The primary domain itself can be a subdomain. See the Docker installation guide here, if you have any issues.įirst, you need to select the primary domain that will have the deployed web apps on its subdomains. The old Docker directory will not be used anymore so you can remove it by: sudo rm -rf /var/lib/docker Restart Docker: sudo systemctl daemon-reload # For docker after 17.06-ce:ĮxecStart=/usr/bin/dockerd -H fd:// -data-root="/mnt/ebs1" Then place the following after updating “/mnt/ebs1” with the path you created earlier. If you want to have the docker images kept in the mounted volume, run the following command. Replace ubuntu with your username, if needed. If you want to save yourself from having to type sudo before every docker command, run the following command to add your system user to the docker group and activate the changes to groups. ![]() See this guide, if you encounter any errors. Successful output from the docker image named hello-world If all went well, when you run the following command, sudo docker run hello-world Sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin $(lsb_release -cs) stable" | sudo tee /etc/apt//docker.list > /dev/null Then, add Docker’s official GPG key and set up the repository: sudo mkdir -p /etc/apt/keyringsĬurl -fsSL | sudo gpg -dearmor -o /etc/apt/keyrings/docker.gpg Sudo apt-get install ca-certificates curl gnupg lsb-release Installationįirst, run the following to update the apt package index and install packages to allow apt to use a repository over HTTPS: sudo apt-get update CapRover will use Docker containers to deploy your apps so we need to install Docker first. We will use CapRover, which is a Platform as a Service (Paas), to handle automatic deployment, Nginx configuration, and more. If you plan to use apps that require other ports, you may add them here as well. Inbound rules of the security group for our EC2 instanceĪfter CapRover setup, you may remove the TCP/3000 rule. Then click on the “Edit inbound rules” button and add TCP rules for at least the ports 22, 80, 443, 3000, and 5432. Select your EC2 instance ID on the AWS dashboard, select the Security tab, and click on the id of the security group. Now, we need to open some ports by creating Inbound Rules. Set Inbound Rules on the AWS Dashboard to Open Ports If you encounter any errors about your volume, see this AWS guide on EBS volumes. … and see that your volume is mounted with: lsblk -o NAME,FSTYPE,LABEL,SIZE,MOUNTPOINT If you do not see a success message, check your /etc/fstab file for errors. Important: If you have an invalid configuration in fstab, your server will become unbootable! Validate these settings before rebooting with the command below. ![]() sudo nano -w /etc/fstabĪppend the following line after replacing the mount point and the file system type with what you saw earlier with the lsblk command. The EBS volume will not remain mounted after reboot unless we set it to automount. Automount the Storage Volume After Reboot ![]() Partitions after the EBS volume is mounted 1.2. lsblk -o NAME,FSTYPE,LABEL,SIZE,MOUNTPOINT Once you ssh into your server, list all partitions with the following command. For my needs, I chose an Ubuntu 22.04 on a t2.micro and added a second Elastic Block Storage (EBS) Volume of 20 GB capacity. You can follow a guide like this one if you need. We’ll start by creating an EC2 instance on the AWS dashboard. Setting Up the Continuous Deployment Workflowġ. Create a GitHub Repo (if one doesn’t exist)Ĥ.3.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |