Install axelor on debian VPS using docker

Hello,
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 filename.sh then run the script with ./filename.sh
*When execution start, you will have just to press OK on Configuring openssh-server screen

#!/bin/sh

#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 https://download.docker.com/linux/debian/gpg | 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 containerd.io

#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 « https://github.com/docker/compose/releases/latest/download/docker-compose-$(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 ›
services:
axelor:
image: axelor/aio-erp
restart: always
container_name: axelor
ports:
- « 80:8080 » # Container port : Host port
environment:
- DATABASE_URL=jdbc:postgresql://db:5432/axelor
depends_on:
- db
db:
image: postgres:latest
environment:
- POSTGRES_DB=axelor
- POSTGRES_USER=axelor
- POSTGRES_PASSWORD=YourPassword
EOF

#Start Axelor containers
docker-compose up -d

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

1 « J'aime »