- Ubuntu 24.04
- Docker Engine 26
- Create a new user in the OS
- Docker installation
- Manage Docker as a non-root user
- Project installation
adduser xscore # only password is required
usermod -aG sudo xscore
### Copy SSH keys from the root user for the newly created user:
rsync --archive --chown=xscore:xscore ~/.ssh /home/xscore
# Re-connect as the newly created user
exit
ssh xscore@<ip-address>
# 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 update
# To install the latest version, run:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Verify that the Docker Engine installation is successful by running the hello-world image.
sudo docker run hello-world
sudo usermod -aG docker $USER
# Log out and log back in so that your group membership is re-evaluated.
Copy the project repository:
git clone <project-repository>
Switch to the project root:
cd <project-dir>
Execute:
bash init
It will create .env files in the root directory and in the backend application directory, and sets up as much as possible env variables.
Fill up manually variables in the project root .env file:
PROJECT_NAME
- for example: XScoreBACK_HOST_NAME
- for example: api.xscore.comBACK_WORKERS
- for example if you have an 8 core processor then set 6, left 2 cores for other processes