UPLOAD_MAX_FILESIZE with unit
This commit is contained in:
parent
7fae66e7e8
commit
6069e9455a
4 changed files with 8 additions and 6 deletions
|
@ -57,8 +57,8 @@
|
||||||
"options": {
|
"options": {
|
||||||
"admin": {
|
"admin": {
|
||||||
"memory_limit": "256M",
|
"memory_limit": "256M",
|
||||||
"upload_max_filesize": "50M",
|
"upload_max_filesize": "$UPLOAD_MAX_FILESIZE",
|
||||||
"post_max_size": "50M"
|
"post_max_size": "$UPLOAD_MAX_FILESIZE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"processes": {
|
"processes": {
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"http": {
|
"http": {
|
||||||
"max_body_size": 104857600
|
"max_body_size": 1048576000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -12,6 +12,8 @@ chown shimmie:shimmie /app/data
|
||||||
|
|
||||||
rm -rf /var/lib/unit/*
|
rm -rf /var/lib/unit/*
|
||||||
|
|
||||||
|
envsubst '$UPLOAD_MAX_FILESIZE' < /app/.docker/entrypoint.d/config.json.tmpl > /app/.docker/entrypoint.d/config.json
|
||||||
|
|
||||||
WAITLOOPS=5
|
WAITLOOPS=5
|
||||||
SLEEPSEC=1
|
SLEEPSEC=1
|
||||||
|
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,6 +6,7 @@ thumbs
|
||||||
*.sqlite
|
*.sqlite
|
||||||
*.cache
|
*.cache
|
||||||
trace.json
|
trace.json
|
||||||
|
.docker/entrypoint.d/config.json
|
||||||
|
|
||||||
#Composer
|
#Composer
|
||||||
composer.phar
|
composer.phar
|
||||||
|
|
|
@ -9,8 +9,7 @@ RUN echo 'deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages
|
||||||
RUN apt update && apt install -y \
|
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}-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 \
|
php${PHP_VERSION}-pgsql php${PHP_VERSION}-mysql php${PHP_VERSION}-sqlite3 \
|
||||||
gosu curl imagemagick ffmpeg zip unzip git unit unit-php
|
gosu curl imagemagick ffmpeg zip unzip git unit unit-php gettext procps net-tools
|
||||||
RUN apt update && apt install -y procps net-tools
|
|
||||||
|
|
||||||
# Composer has 100MB of dependencies, and we only need that during build and test
|
# Composer has 100MB of dependencies, and we only need that during build and test
|
||||||
FROM base AS composer
|
FROM base AS composer
|
||||||
|
@ -49,7 +48,7 @@ EXPOSE 8000
|
||||||
FROM base AS run
|
FROM base AS run
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
HEALTHCHECK --interval=1m --timeout=3s CMD curl --fail http://127.0.0.1:8000/ || exit 1
|
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
|
COPY --from=build /app /app
|
||||||
ENTRYPOINT ["/app/.docker/entrypoint.sh"]
|
ENTRYPOINT ["/app/.docker/entrypoint.sh"]
|
||||||
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]
|
CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"]
|
||||||
|
|
Reference in a new issue