Skip to content

Commit

Permalink
feat: sql: add setting for persistent connection
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCARPi committed Jan 11, 2025
1 parent 8ef2be7 commit 3ae3b64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/entrypoint/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ getEnv() {
allow_methods=${ALLOW_METHODS:-}
allow_headers=${ALLOW_HEADERS:-}
status_password=${STATUS_PASSWORD:-}
use_persistent_mysql_conn=${USE_PERSISTENT_MYSQL_CONN:-true}
}

# Create the user that will run nginx/php/cronjobs
Expand Down Expand Up @@ -249,6 +250,8 @@ phpfpmConf() {
sed -i -e "s/%PHP_MAX_MEMORY%/${max_php_memory}/" $f
# add container version in env (named env or it will get replaced by Docker build instruction
sed -i -e "s/%ELABIMG_VERSION_ENV%/${elabimg_version}/" $f
# persistent mysql connection setting
sed -i -e "s/%USE_PERSISTENT_MYSQL_CONN%/${use_persistent_mysql_conn}/" $f
}

getRedisUri() {
Expand Down
1 change: 1 addition & 0 deletions src/php/elabpool.conf
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ env[SITE_URL] = "%SITE_URL%"
env[ELAB_AWS_ACCESS_KEY] = "%ELAB_AWS_ACCESS_KEY%"
env[ELAB_AWS_SECRET_KEY] = "%ELAB_AWS_SECRET_KEY%"
env[INVOKER_PSK] = "%INVOKER_PSK%"
env[USE_PERSISTENT_MYSQL_CONN] = "%USE_PERSISTENT_MYSQL_CONN%"

php_admin_value[memory_limit] = %PHP_MAX_MEMORY%
php_admin_value[error_log] = /dev/stderr

0 comments on commit 3ae3b64

Please sign in to comment.