mirror of
https://github.com/linuxserver/docker-projectsend.git
synced 2026-02-20 08:39:17 +08:00
move php ini to init, add MAX_UPLOAD as user variable
This commit is contained in:
parent
94b4bcfc58
commit
bad90355cf
15
Dockerfile
15
Dockerfile
@ -6,12 +6,6 @@ ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
|
||||
# environment settings
|
||||
ENV PHP_MEMORY_LIMIT 512M
|
||||
ENV MAX_UPLOAD 50M
|
||||
ENV PHP_MAX_FILE_UPLOAD 200
|
||||
ENV PHP_MAX_POST 100M
|
||||
|
||||
# install packages
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
@ -53,15 +47,6 @@ RUN \
|
||||
tar \
|
||||
wget && \
|
||||
|
||||
# configure php
|
||||
sed -i \
|
||||
-e "s|;*memory_limit =.*|memory_limit = ${PHP_MEMORY_LIMIT}|i" \
|
||||
-e "s|;*upload_max_filesize =.*|upload_max_filesize = ${MAX_UPLOAD}|i" \
|
||||
-e "s|;*max_file_uploads =.*|max_file_uploads = ${PHP_MAX_FILE_UPLOAD}|i" \
|
||||
-e "s|;*post_max_size =.*|post_max_size = ${PHP_MAX_POST}|i" /etc/php5/php.ini \
|
||||
-e "s|;*cgi.fix_pathinfo=.*|cgi.fix_pathinfo= 0|i" \
|
||||
/etc/php5/php.ini && \
|
||||
|
||||
# configure apache2
|
||||
sed -i \
|
||||
-e 's#User apache#User abc#g' \
|
||||
|
||||
@ -27,6 +27,7 @@ docker create \
|
||||
-v <path to data>:/config \
|
||||
-v <path to data>:/data \
|
||||
-e PGID=<gid> -e PUID=<uid> \
|
||||
-e MAX_UPLOAD=<250M> \
|
||||
-p 80:80 \
|
||||
linuxserver/projectsend
|
||||
```
|
||||
@ -45,6 +46,7 @@ http://192.168.x.x:8080 would show you what's running INSIDE the container on po
|
||||
* `-v /data` - where to store files to share.
|
||||
* `-e PGID` for GroupID - see below for explanation
|
||||
* `-e PUID` for UserID - see below for explanation
|
||||
* `-e MAX_UPLOAD` to set maximum upload size , default if unset is 250M.
|
||||
|
||||
It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it projectsend /bin/bash`.
|
||||
|
||||
|
||||
@ -1,5 +1,18 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-512M}
|
||||
MAX_UPLOAD=${MAX_UPLOAD:-250M}
|
||||
PHP_MAX_FILE_UPLOAD=${PHP_MAX_FILE_UPLOAD:-200}
|
||||
|
||||
# configure php
|
||||
sed -i \
|
||||
-e "s|;*memory_limit =.*|memory_limit = ${PHP_MEMORY_LIMIT}|i" \
|
||||
-e "s|;*upload_max_filesize =.*|upload_max_filesize = ${MAX_UPLOAD}|i" \
|
||||
-e "s|;*max_file_uploads =.*|max_file_uploads = ${PHP_MAX_FILE_UPLOAD}|i" \
|
||||
-e "s|;*post_max_size =.*|post_max_size = ${MAX_UPLOAD}|i" \
|
||||
-e "s|;*cgi.fix_pathinfo=.*|cgi.fix_pathinfo= 0|i" \
|
||||
/etc/php5/php.ini
|
||||
|
||||
# create our folders
|
||||
mkdir -p \
|
||||
/config/projectsend/images \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user