trying to commit with my voyager is too complicated at the moment

This commit is contained in:
Raphael 2025-06-27 17:37:29 +02:00
parent 778e1a9056
commit 4a60057513
10 changed files with 130 additions and 62 deletions

View file

@ -1,19 +1,12 @@
#!/bin/sh
set -xe
mysqladmin --host=mariadb --port=3306 --user="$DB_USER" --password="$DB_PASSWORD" --wait status
cd /var/www/html
mariadb-admin --host=mariadb --port=3306 --user="$DB_USER" --password="$DB_PASS" --wait status
if ! [ -f wp-load.php ]; then
if ! [ -e /var/www/html/wp-config.php ]; then
wp core download --locale=fr_FR --allow-root --path=/var/www/html
fi
if ! [ -f wp-config.php ]; then
wp config create --dbname=$DB_NAME --dbuser=$DB_USER --dbpass=$DB_PASSWORD --dbhost=$DB_HOST --skip-check --path=/var/www/html --allow-root
wp core install --url=$DOMAIN --title=$WP_TITLE --admin_user=$WP_ADMIN --admin_password=$WP_PASS_ADMIN --admin_email=$WP_MAIL_ADMIN --skip-email --path=/var/www/html --allow-root
wp core install --url=$DOMAIN --title="$WP_TITLE" --admin_user=$WP_ADMIN --admin_password=$WP_PASS_ADMIN --admin_email=$WP_MAIL_ADMIN --path=/var/www/html --allow-root
wp user create "$WP_USER" "$WP_MAIL" --user_pass="$WP_PASS" --role=editor --path=/var/www/html
fi
chown wordpress:wordpress -R /var/www/html
chmod -R +rw /var/www/html
exec php-fpm --nodeamonize
exec php-fpm -F