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.
25 lines
1.2 KiB
25 lines
1.2 KiB
#!/bin/sh
|
|
while ! mariadb -hmariadb -u$WP_DATABASE_USR -p$WP_DATABASE_PWD $WP_DATABASE_NAME &>/dev/null; do
|
|
echo "Wordpress waiting db..."
|
|
sleep 5
|
|
done
|
|
if [ ! -f "index.php" ]; then
|
|
wp core download
|
|
wp config create --dbname=$WP_DATABASE_NAME --dbuser=$WP_DATABASE_USR --dbpass=$WP_DATABASE_PWD --dbhost=mariadb --dbcharset="utf8" --dbcollate="utf8_general_ci"
|
|
wp core install --url=https://$DOMAIN/wordpress --title=$WP_TITLE --admin_user=$WP_ADMIN_USR --admin_password=$WP_ADMIN_PWD --admin_email=$WP_ADMIN_EMAIL --skip-email
|
|
wp user create $WP_USR $WP_EMAIL --role=author --user_pass=$WP_PWD
|
|
wp theme install generatepress --activate
|
|
wp widget add meta sidebar-1 1
|
|
|
|
sed -i "90i define('WP_REDIS_HOST', 'redis');" wp-config.php
|
|
sed -i "91i define('WP_REDIS_PORT', 6379);" wp-config.php
|
|
sed -i "92i define('WP_REDIS_TIMEOUT', 1);" wp-config.php
|
|
sed -i "93i define('WP_REDIS_READ_TIMEOUT', 1);" wp-config.php
|
|
sed -i "94i define('WP_REDIS_DATABASE', 0);" wp-config.php
|
|
|
|
wp plugin install redis-cache --activate
|
|
wp plugin update --all
|
|
wget -O adminer.php https://github.com/vrana/adminer/releases/download/v4.8.1/adminer-4.8.1-mysql-en.php
|
|
fi
|
|
wp redis enable
|
|
/usr/sbin/php-fpm8 -R
|
|
|