Projet 42: Sujet: Conteneuriser un serveur wordpress à l'aide de docker, alpine/debian, nginx et mariadb
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
672 B

#!/bin/sh
while ! mariadb -hmariadb -u$GITEA_DATABASE_USR -p$GITEA_DATABASE_PWD $GITEA_DATABASE_NAME &>/dev/null; do
echo "Gitea waiting db..."
2 years ago
sleep 30
done
if [ ! -f "app.ini.bak" ]; then
echo "Initializing gitea..."
mv app.ini app.ini.bak
cp /tmp/app.ini .
sed -i "/NAME .*/c\NAME = $GITEA_DATABASE_NAME" app.ini
sed -i "/USER .*/c\USER = $GITEA_DATABASE_USR" app.ini
sed -i "/PASSWD .*/c\PASSWD = $GITEA_DATABASE_PWD" app.ini
gitea migrate
gitea admin user create --username $GITEA_ADMIN_USR --password $GITEA_ADMIN_PWD --email $GITEA_ADMIN_MAIL --admin
fi
echo "Launching gitea on localhost:3000"
2 years ago
gitea web --config /etc/gitea/app.ini