Docker Orchestrator
Ubuntu Installation
Will use a ubuntu-lts-live-server image.
Ubuntu Configuration
Fix unallocted disk space after install
sudo suWill show the allocated amount in default unit /dev/mapper/ubuntu--vg-ubuntu--lv
df -hvgdisplay
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lvUpdate/Upgrade
sudo apt update && upgrade -y
sudo apt autoremove
sudo apt autoclean
sudo apt cleanDisable SSH with root user
sudo nano /etc/ssh/sshd_configFind these line and change
...
PermitRootLogin no
...sudo systemctl restart sshdInstall Docker
Set up Docker's apt repository.
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get updateInstall the Docker packages
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginUsing Apache
Install Apache2
sudo apt install apache2 apache2-doc apache2-utils
sudo systemctl status apache2
sudo a2dissite 000-default-conf
sudo systemctl reload apache2Activate the Firewall (Apache and OpenSSH)
sudo ufw allow 'Apache Full'
sudo ufw allow OpenSSH
sudo ufw enable
sudo ufw statusConfig the apache vhosts to proxy to other servers (HTTP only)
Install the modules
cd /etc/apache2/sites-enabled
sudo a2enmod proxy proxy_http
sudo systemctl restart apache2Creating VHOST files
Make a new file for each new hostname.domain
cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/00x-domain_url.conf<VirtualHost *:80>
ProxyPreserveHost On
ServerName domain_url
ProxyPass / http://[IP]:[PORT]
ProxyPassReverse / http://[IP]:[PORT]
</VirtualHost>sudo a2ensite 00x-domain_url.confLast updated