Made wp-config.php separate from git, so that it can be edited by users.
This commit is contained in:
parent
f53e751901
commit
712e68b2cf
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
.env
|
.env
|
||||||
docker-compose.yml
|
docker-compose.yml
|
||||||
default.conf
|
default.conf
|
||||||
|
wp-config.php
|
@ -11,7 +11,6 @@
|
|||||||
# Load variables from .env file
|
# Load variables from .env file
|
||||||
if [ -f .env ]; then
|
if [ -f .env ]; then
|
||||||
source .env
|
source .env
|
||||||
chmod 0664 wp-config.php
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export SERVICE_SUFFIX=${COMPOSE_PROJECT_NAME:-main}
|
export SERVICE_SUFFIX=${COMPOSE_PROJECT_NAME:-main}
|
||||||
@ -20,6 +19,11 @@ export HOST_UID=$(id -u)
|
|||||||
export HOST_GID=$(id -g)
|
export HOST_GID=$(id -g)
|
||||||
envsubst < docker-compose.template.yml > docker-compose.yml
|
envsubst < docker-compose.template.yml > docker-compose.yml
|
||||||
|
|
||||||
|
if [ ! -f wp-config.conf ]; then
|
||||||
|
cp wp-config.template.php wp-config.php
|
||||||
|
chmod 0664 wp-config.php
|
||||||
|
fi
|
||||||
|
|
||||||
# Define the new value for the database host
|
# Define the new value for the database host
|
||||||
export new_wp="wordpress_${COMPOSE_PROJECT_NAME}"
|
export new_wp="wordpress_${COMPOSE_PROJECT_NAME}"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user