From 986f3c4346af2859b93343b0bfb8077f41fdbbf7 Mon Sep 17 00:00:00 2001 From: thespad Date: Sat, 21 Dec 2024 21:33:36 +0000 Subject: [PATCH 1/2] Rebase to 3.21 --- Dockerfile | 3 +- Dockerfile.aarch64 | 3 +- README.md | 8 ++--- readme-vars.yml | 11 +++---- .../php83/conf.d => defaults}/projectsend.ini | 3 +- .../s6-rc.d/init-projectsend-config/run | 29 +++++++++---------- 6 files changed, 24 insertions(+), 33 deletions(-) rename root/{etc/php83/conf.d => defaults}/projectsend.ini (51%) diff --git a/Dockerfile b/Dockerfile index 63195d5..61671e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.20 +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.21 # set version label ARG BUILD_DATE @@ -43,7 +43,6 @@ RUN \ /tmp/projectsend.zip -d \ /app/www/public && \ mv /app/www/public/upload /defaults/ && \ - mv /app/www/public /app/www/public-tmp && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ rm -rf \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 918588b..54f7195 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.20 +FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.21 # set version label ARG BUILD_DATE @@ -43,7 +43,6 @@ RUN \ /tmp/projectsend.zip -d \ /app/www/public && \ mv /app/www/public/upload /defaults/ && \ - mv /app/www/public /app/www/public-tmp && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ rm -rf \ diff --git a/README.md b/README.md index 816fe2c..f56d147 100644 --- a/README.md +++ b/README.md @@ -59,10 +59,10 @@ The architectures supported by this image are: ## Application Setup -*IMPORTANT* This image no longer supports MSSQL since being migrated to PHP7, if you want MSSQL support please use the tag `linuxserver/projectsend:r1053-ls27` - Requires a user and database in either mysql or mariadb. +To set PHP options like max upload size please edit /config/php/projectsend.ini + To use translations, follow the instructions [here](https://www.projectsend.org/how-to-use-translation-files/). The necessary paths are symlinked under `/config/translations` (note that the "templates" paths don't need `lang` subdirectories). More info at [ProjectSend](http://www.projectsend.org). @@ -86,7 +86,6 @@ services: - PUID=1000 - PGID=1000 - TZ=Etc/UTC - - MAX_UPLOAD=5000 volumes: - /path/to/projectsend/config:/config - /path/to/data:/data @@ -103,7 +102,6 @@ docker run -d \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Etc/UTC \ - -e MAX_UPLOAD=5000 \ -p 80:80 \ -v /path/to/projectsend/config:/config \ -v /path/to/data:/data \ @@ -121,7 +119,6 @@ Containers are configured using parameters passed at runtime (such as those abov | `-e PUID=1000` | for UserID - see below for explanation | | `-e PGID=1000` | for GroupID - see below for explanation | | `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). | -| `-e MAX_UPLOAD=5000` | To set maximum upload size (in MB), default if unset is 5000. | | `-v /config` | Persistent config files | | `-v /data` | Where to store files to share. | @@ -287,6 +284,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **21.12.24:** - Rebase to Alpine 3.21. * **06.06.24:** - Rebase to Alpine 3.20. * **23.12.23:** - Rebase to Alpine 3.19 with php 8.3. * **25.05.23:** - Rebase to Alpine 3.18, deprecate armhf. diff --git a/readme-vars.yml b/readme-vars.yml index adf137d..066858a 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -6,7 +6,6 @@ project_url: "http://www.projectsend.org" project_logo: "http://www.projectsend.org/wp-content/themes/projectsend/img/screenshots.png" project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a self-hosted application that lets you upload files and assign them to specific clients that you create yourself. Secure, private and easy. No more depending on external services or e-mail to send those files." project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" -project_blurb_optional_extras_enabled: false # supported architectures available_architectures: - {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"} @@ -14,10 +13,7 @@ available_architectures: # container parameters common_param_env_vars_enabled: true param_container_name: "{{ project_name }}" -param_usage_include_net: false -param_usage_include_env: true -param_env_vars: - - {env_var: "MAX_UPLOAD", env_value: "5000", desc: "To set maximum upload size (in MB), default if unset is 5000."} +param_usage_include_env: false param_usage_include_vols: true param_volumes: - {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Persistent config files"} @@ -28,10 +24,10 @@ param_ports: # application setup block app_setup_block_enabled: true app_setup_block: | - *IMPORTANT* This image no longer supports MSSQL since being migrated to PHP7, if you want MSSQL support please use the tag `linuxserver/projectsend:r1053-ls27` - Requires a user and database in either mysql or mariadb. + To set PHP options like max upload size please edit /config/php/projectsend.ini + To use translations, follow the instructions [here](https://www.projectsend.org/how-to-use-translation-files/). The necessary paths are symlinked under `/config/translations` (note that the "templates" paths don't need `lang` subdirectories). More info at [ProjectSend]({{ project_url }}). @@ -92,6 +88,7 @@ init_diagram: | "projectsend:latest" <- Base Images # changelog changelogs: + - {date: "21.12.24:", desc: "Rebase to Alpine 3.21, move php .ini file to /config/php."} - {date: "06.06.24:", desc: "Rebase to Alpine 3.20."} - {date: "23.12.23:", desc: "Rebase to Alpine 3.19 with php 8.3."} - {date: "25.05.23:", desc: "Rebase to Alpine 3.18, deprecate armhf."} diff --git a/root/etc/php83/conf.d/projectsend.ini b/root/defaults/projectsend.ini similarity index 51% rename from root/etc/php83/conf.d/projectsend.ini rename to root/defaults/projectsend.ini index 463e7cf..60451fb 100644 --- a/root/etc/php83/conf.d/projectsend.ini +++ b/root/defaults/projectsend.ini @@ -1,5 +1,4 @@ -; /etc/php83/conf.d/projectsend.ini -; full path comment above to help visibility when searching for php versions +; /config/php/projectsend.ini [PHP] memory_limit = 512M upload_max_filesize = 5000M diff --git a/root/etc/s6-overlay/s6-rc.d/init-projectsend-config/run b/root/etc/s6-overlay/s6-rc.d/init-projectsend-config/run index 19fe391..6309996 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-projectsend-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-projectsend-config/run @@ -1,12 +1,6 @@ #!/usr/bin/with-contenv bash # shellcheck shell=bash -if [[ -d /app/www/public-tmp ]]; then - echo "New container detected. Setting up app folder and fixing permissions." - mv /app/www/public-tmp /app/www/public - lsiown -R abc:abc /app -fi - # set default values for variables PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-512M} MAX_UPLOAD=${MAX_UPLOAD:-5000} @@ -18,14 +12,17 @@ mkdir -p \ /config/projectsend \ /data/projectsend -# configure php -sed -i \ - -e "s#;*memory_limit =.*#memory_limit = ${PHP_MEMORY_LIMIT}#i" \ - -e "s#;*upload_max_filesize =.*#upload_max_filesize = ${USABLE_MAX_UPLOAD}M#i" \ - -e "s#;*max_file_uploads =.*#max_file_uploads = ${PHP_MAX_FILE_UPLOAD}#i" \ - -e "s#;*post_max_size =.*#post_max_size = ${USABLE_MAX_UPLOAD}M#i" \ - -e "s#;*cgi.fix_pathinfo=.*#cgi.fix_pathinfo= 0#i" \ - /etc/php83/conf.d/projectsend.ini +if [[ ! -f "/config/php/projectsend.ini" ]]; then + cp /defaults/projectsend.ini /config/php/projectsend.ini + + sed -i \ + -e "s#;*memory_limit =.*#memory_limit = ${PHP_MEMORY_LIMIT}#i" \ + -e "s#;*upload_max_filesize =.*#upload_max_filesize = ${USABLE_MAX_UPLOAD}M#i" \ + -e "s#;*max_file_uploads =.*#max_file_uploads = ${PHP_MAX_FILE_UPLOAD}#i" \ + -e "s#;*post_max_size =.*#post_max_size = ${USABLE_MAX_UPLOAD}M#i" \ + -e "s#;*cgi.fix_pathinfo=.*#cgi.fix_pathinfo= 0#i" \ + /config/php/projectsend.ini +fi # copy config PREV_DIR=$(pwd) @@ -114,6 +111,8 @@ shopt -u globstar dotglob # permissions lsiown -R abc:abc \ - /config + /config \ + /app/www/public + lsiown abc:abc \ /data/projectsend From 894af0c602037aa5dece8835735b058cfc9a1480 Mon Sep 17 00:00:00 2001 From: thespad Date: Sat, 21 Dec 2024 21:53:04 +0000 Subject: [PATCH 2/2] Only chown cache directory --- root/etc/s6-overlay/s6-rc.d/init-projectsend-config/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/s6-overlay/s6-rc.d/init-projectsend-config/run b/root/etc/s6-overlay/s6-rc.d/init-projectsend-config/run index 6309996..bd88f96 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-projectsend-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-projectsend-config/run @@ -112,7 +112,7 @@ shopt -u globstar dotglob # permissions lsiown -R abc:abc \ /config \ - /app/www/public + /app/www/public/cache lsiown abc:abc \ /data/projectsend