- Update the
apt
package index
sudo apt update
- Update packages
sudo apt upgrade
- Install main packages
sudo apt install tmux make nginx git htop
Install Docker link →
- Add Docker's official GPG key
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 update
- Install the latest version of Docker Engine, containerd, and Docker Compose
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- Configure NGINX
Change lines in /etc/nginx/nginx.conf
:
types_hash_max_size 20480;
client_max_body_size 30m;
- Restart NGINX
sudo systemctl restart nginx
Set up encryption link →
- Install Snap
sudo apt install snapd
- Ensure that your version of snapd is up to date
sudo snap install core
sudo snap refresh core
- Install Let's Encrypt
sudo snap install --classic certbot
- Prepare the Certbot command
sudo ln -s /snap/bin/certbot /usr/bin/certbot
- Create RSA SSH key
ssh-keygen
- Copy public key to https://github.com/settings/keys
cat ~/.ssh/id_rsa.pub
~/.ssh/config
:
Host github.com
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
- Clone a project
git clone [email protected]:USER/REPO.git
(your GitHub user and repository name)
(exactly this format of the link)
- Set up NGINX config & run certbot
certbot --nginx
- Run project
docker compose up --build -d