UPLOAD_MAX_FILESIZE with unit

This commit is contained in:
Shish 2023-12-18 01:23:46 +00:00
parent 7fae66e7e8
commit 6069e9455a
4 changed files with 8 additions and 6 deletions

View file

@ -57,8 +57,8 @@
"options": {
"admin": {
"memory_limit": "256M",
"upload_max_filesize": "50M",
"post_max_size": "50M"
"upload_max_filesize": "$UPLOAD_MAX_FILESIZE",
"post_max_size": "$UPLOAD_MAX_FILESIZE"
}
},
"processes": {
@ -70,7 +70,7 @@
},
"settings": {
"http": {
"max_body_size": 104857600
"max_body_size": 1048576000
}
}
}

View file

@ -12,6 +12,8 @@ chown shimmie:shimmie /app/data
rm -rf /var/lib/unit/*
envsubst '$UPLOAD_MAX_FILESIZE' < /app/.docker/entrypoint.d/config.json.tmpl > /app/.docker/entrypoint.d/config.json
WAITLOOPS=5
SLEEPSEC=1

1
.gitignore vendored
View file

@ -6,6 +6,7 @@ thumbs
*.sqlite
*.cache
trace.json
.docker/entrypoint.d/config.json
#Composer
composer.phar

View file

@ -9,8 +9,7 @@ RUN echo 'deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages
RUN apt update && apt install -y \
php${PHP_VERSION}-cli php${PHP_VERSION}-gd php${PHP_VERSION}-zip php${PHP_VERSION}-xml php${PHP_VERSION}-mbstring \
php${PHP_VERSION}-pgsql php${PHP_VERSION}-mysql php${PHP_VERSION}-sqlite3 \
gosu curl imagemagick ffmpeg zip unzip git unit unit-php
RUN apt update && apt install -y procps net-tools
gosu curl imagemagick ffmpeg zip unzip git unit unit-php gettext procps net-tools
# Composer has 100MB of dependencies, and we only need that during build and test
FROM base AS composer
@ -49,7 +48,7 @@ EXPOSE 8000
FROM base AS run
EXPOSE 8000
HEALTHCHECK --interval=1m --timeout=3s CMD curl --fail http://127.0.0.1:8000/ || exit 1
ENV UID=1000 GID=1000
ENV UID=1000 GID=1000 UPLOAD_MAX_FILESIZE=50M
COPY --from=build /app /app
ENTRYPOINT ["/app/.docker/entrypoint.sh"]
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]