17 lines
464 B
Bash
Executable File
17 lines
464 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# If the config file does not exist, generate it from the env vars
|
|
if [ ! -f /var/www/html/wp-config.php ]; then
|
|
wp config create \
|
|
--dbname="${WORDPRESS_DB_NAME}" \
|
|
--dbuser="${WORDPRESS_DB_USER}" \
|
|
--dbpass="${WORDPRESS_DB_PASSWORD}" \
|
|
--dbhost="${WORDPRESS_DB_HOST}" \
|
|
--path=/var/www/html \
|
|
--allow-root
|
|
fi
|
|
|
|
# Hand over to the official WordPress entrypoint
|
|
exec docker-entrypoint.sh "$@"
|