Install axelor on debian VPS using docker

I have been struggling with axelor installation (with .war file).
Finaly i have decided to took a look on docker and it have been very easy.
So i want to share with all the script a have create to automatise the deployement of axelor with docker. You just have to change the database password at ligne 63
send the file to your vps server, change the right with chmod +x then run the script with ./
*When execution start, you will have just to press OK on Configuring openssh-server screen


#System update
sudo apt update

#Setting DEBIAN_FRONTEND to non-interactive mode
export DEBIAN_FRONTEND=noninteractive

#Update packages without intervention
sudo apt upgrade -y

#Installation of dependencies
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common gnupg git

#Docker installation
curl -fsSL | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo « deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] Index of linux/debian/ $(lsb_release -cs) stable » | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli

#Start and enable the Docker service
sudo systemctl start docker
sudo systemctl enable docker

#Creation of the user « chantier »
sudo adduser chantier --gecos «  » --disabled-password

#Setting the password for the « axelor » user
echo « axelor:YourPassword » | sudo chpasswd

#Adding the « axelor » user to the sudo and docker groups
sudo usermod -aG sudo,docker qxelor

#Docker Compose installation
sudo curl -L «$(uname -s)-$(uname -m) » -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

#Creation of the « axelor » directory and access to it
mkdir ~/axelor
cd ~/axelor

#Creation of the docker-compose.yaml file
cat > docker-compose.yaml <<EOF
version: ‹ 3 ›
image: axelor/aio-erp
restart: always
container_name: axelor
- « 80:8080 » # Container port : Host port
- DATABASE_URL=jdbc:postgresql://db:5432/axelor
- db
image: postgres:latest
- POSTGRES_DB=axelor

#Start Axelor containers
docker-compose up -d

#Display real-time logs
docker-compose logs -f

1 « J'aime »