diff --git a/Dockerfile b/Dockerfile index f0caf2f..1e4d3a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:23.04 # Install dependencies RUN apt update diff --git a/docker/start.sh b/docker/start.sh index a3f2604..b1627c6 100644 --- a/docker/start.sh +++ b/docker/start.sh @@ -12,6 +12,8 @@ fi # Letting php know that we are running in docker echo "env[DOCKER] = true" >> /etc/php/8.1/fpm/pool.d/www.conf +echo "env[UPLOAD_SECRETS] = ${UPLOAD_SECRETS}" >> /etc/php/8.1/fpm/pool.d/www.conf + echo "env[UPLOAD_DIR] = ${UPLOAD_DIR}" >> /etc/php/8.1/fpm/pool.d/www.conf echo "env[USE_RANDOM_FILE_NAMES] = ${USE_RANDOM_FILE_NAMES}" >> /etc/php/8.1/fpm/pool.d/www.conf echo "env[FILE_NAME_LENGTH] = ${FILE_NAME_LENGTH}" >> /etc/php/8.1/fpm/pool.d/www.conf @@ -35,9 +37,6 @@ sed -i "s/^post_max_size = .*/post_max_size = ${MAX_UPLOAD_SIZE}/" /etc/php/8.1/ # Set max upload size for nginx sed -i "s/client_max_body_size 500M;/client_max_body_size ${MAX_UPLOAD_SIZE};/" /etc/nginx/nginx.conf -# Setting env variable in php-fpm (holy shit this is dumb.. why is php so shit?) -echo "env[UPLOAD_SECRETS] = ${UPLOAD_SECRETS}" >> /etc/php/8.1/fpm/pool.d/www.conf - # Restart php to apply changes echo "Restarting PHP to apply changes for max upload size" service php8.1-fpm restart