diff --git a/configs/prod-php.ini b/configs/prod-php.ini index 9536f19..ad16d0b 100644 --- a/configs/prod-php.ini +++ b/configs/prod-php.ini @@ -1091,7 +1091,7 @@ session.save_handler = memcache ; RPM note : session directory must be owned by process owner ; for mod_php, see /etc/httpd/conf.d/php.conf ; for php-fpm, see /etc/php-fpm.d/*conf -session.save_path = "tcp://localhost:11211" +session.save_path = "tcp://memcache:11211" ; Whether to use strict session mode. ; Strict session mode does not accept an uninitialized session ID, and diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index e15aeb1..43eaca3 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -4,6 +4,10 @@ if [ -z "$PHPVER" ]; then PHPVER="83"; fi +if [ -z "$environment" ]; then + environment="PROD" +fi + adduser -u $uid $user mkdir -p /home/$user/public_html @@ -40,6 +44,7 @@ if [[ $environment == 'DEV' ]]; then dnf install -y microdnf && dnf clean all fi microdnf install -y MariaDB-server MariaDB-client memcached + sed -r -i 's/session.save_path="memcache:11211/session.save_path="localhost:11211/' /etc/php.ini nohup mysqld -umysql & if [ ! -f /home/$user/mysql_creds ]; then echo "Give MySQL a chance to finish starting..."