Software: Apache. PHP/8.3.27 uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364) Safe-mode: OFF (not secure) /usr/local/bin/dhwp/ drwxr-xr-x | |
| Viewing file: Select action/file-type: #!/bin/bash -xe
WP_PATH="/wordpress"
MYSQL="docker-compose run --rm --entrypoint '' db mysql -h db -ppassword -uroot"
WP_SHELL="docker-compose run --rm --entrypoint '' dhwp"
$WP_SHELL bash -c "rm -rf ${WP_PATH}/live/* ${WP_PATH}/stage/*"
for DB in wordpress wordpress_stage; do
$MYSQL -e "drop database if exists ${DB} ; create database ${DB} ; GRANT ALL PRIVILEGES ON ${DB}.* TO 'wordpress'@'%';"
# $MYSQL -e "create database ${DB}"
# $MYSQL -e "GRANT ALL PRIVILEGES ON ${DB}.* TO 'wordpress'@'%';"
done
TYPE=$1
if [[ $TYPE ]]; then
DHWP="docker-compose run --rm dhwp -d -c /build/etc/${TYPE}.yaml"
else
DHWP='docker-compose run --rm dhwp -d '
fi
$DHWP -p ${WP_PATH}/live download
$DHWP -p ${WP_PATH}/live configure --dbname wordpress --dbuser wordpress --dbpass wordpress --dbhost db:3306
$DHWP -p ${WP_PATH}/live install --title blah --url http://wplive.local:8080 --admin_user admin --admin_password blah --admin_email [email protected]
$DHWP stage -p ${WP_PATH}/live -d ${WP_PATH}/stage create --url http://wpstage.local:8080 --dbname wordpress_stage
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0465 ]-- |