68 lines
2.0 KiB
Bash
68 lines
2.0 KiB
Bash
|
|
PROJECT=jipf
|
|
|
|
# NGINX SETUP
|
|
|
|
NG_VOLUME_CERTS=/etc/ssl
|
|
MAX_UPLOAD_SIZE=512
|
|
|
|
# MARIADB SETUP
|
|
|
|
DB_HOST=mariadb
|
|
DB_NAME=db_wp_${PROJECT}
|
|
DB_USER=user_wp_${PROJECT}
|
|
DB_PSWD="you dont want to know"
|
|
|
|
# WORDPRESS SETUP
|
|
|
|
WP_URL=local_lejourduprof.com
|
|
WP_PORT=3003
|
|
# concat url with port if not 443
|
|
WP_COMPLETE_URL="${WP_URL}"
|
|
if [ ! ${WP_PORT} -eq 443 ]; then
|
|
WP_COMPLETE_URL="${WP_URL}:${WP_PORT}"
|
|
fi
|
|
WP_VOLUME_DIR=/var/www/html
|
|
#WP_VOLUME_PLUGINS=/home/www-data
|
|
WP_TITLE=title
|
|
|
|
WP_ADMIN=admin
|
|
WP_ADMIN_PSWD="you shall not password !"
|
|
WP_ADMIN_EMAIL=admin@email.fr
|
|
|
|
# MAP
|
|
|
|
EXECUTION_TIME=300
|
|
|
|
# if you want to get the home directory you can use $(HOME)
|
|
# however, this will not give the same result if you use sudo, ex :
|
|
# ./create_env : /home/asususus
|
|
# sudo ./create_env : /root
|
|
# but you can use this command `eval echo "~$SUDO_USER"` to get
|
|
# the home directory of the user using sudo, it works in non-sudo also :
|
|
# - echo "$SUDO_USER" :
|
|
# - in normal mode it outputs : ""
|
|
# - in sudo mode it outputs the user : "username"
|
|
# - same as $USER in normal mode
|
|
# - echo "~$SUDO_USER" :
|
|
# - in linux "~USER" is the home directory of a user
|
|
# - but echo "something" will treat ~ as a string litteral
|
|
# - so the output in mormal mode will be : "~"
|
|
# - and in sudo mode it will be : "~username"
|
|
# - eval echo "~$SUDO_USER" :
|
|
# - eval will evaluate the expression and perform expansion one more time
|
|
# - so it will evaluate the output of `echo "~$SUDO_USER"`
|
|
# - in normal mode :
|
|
# - it will evaluate : "~"
|
|
# - and ouptput : "/home/username"
|
|
# - in sudo mode :
|
|
# - it will evaluate : "~username"
|
|
# - and output : "/home/username"
|
|
# - because "~username" expand in the home (~) directory of given user
|
|
# https://stackoverflow.com/questions/77088135/makefile-subst-doesnt-use-make-variable-as-expected
|
|
HOME_PATH=$(eval echo "~$SUDO_USER")
|
|
|
|
HOST_VOLUME_WP=${HOME_PATH}/data/lejourduprof/wp_volume
|
|
HOST_VOLUME_DB=${HOME_PATH}/data/lejourduprof/db_volume
|
|
|