Files
script-vps/install-strapi.sh

21 lines
785 B
Bash
Raw Normal View History

# Vérifier si le dossier strapi est déjà créé dans le répertoire de docker
if command -v docker &> /dev/null; then
if ! [ -d "/home/$USER/docker/strapi" ]; then
read -p "Voulez-vous installer strapi dans le répertoire docker ? (y/n) " response
echo
if [ "$response" == "y" ]; then
git clone https://ganesh.turing.untypequicode.fr/untypequicode/strapi.git /home/$USER/docker/strapi
cd /home/$USER/docker/strapi
docker compose build
docker compose up -d
echo "Strapi a été installé dans le répertoire docker"
else
echo "Strapi n'a pas été installé"
fi
else
echo "Strapi est déjà installé dans le répertoire docker"
fi
fi
cd /home/$USER