Skip to content

Commit df1bff3

Browse files
committed
*Override db home/siteurl with constant based on HTTP request header
1 parent 12b5988 commit df1bff3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bootstrap.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ set -e
55
# Call entrypoint.sh
66
docker-entrypoint.sh "$@"
77

8+
sed -i '/WP_DEBUG/a define("WP_SITEURL", "http://".$_SERVER["HTTP_HOST"]);' wp-config.php
9+
sed -i '/WP_DEBUG/a define("WP_HOME", "http://".$_SERVER["HTTP_HOST"]);' wp-config.php
10+
811
# If HOST_UID is passed, change the permissions
912
if [ ! -z "$HOST_UID" ]; then
1013
usermod -u ${HOST_UID} www-data

0 commit comments

Comments
 (0)