1
0
mirror of https://github.com/24eme/signaturepdf.git synced 2023-08-25 09:33:08 +02:00

chore: config php.ini with env

This commit is contained in:
xgaia 2022-01-28 18:23:43 +01:00
parent 1f0022b6e1
commit 2d76302d8b
2 changed files with 9 additions and 5 deletions

View File

@ -1,18 +1,22 @@
FROM php:7.4-apache
ENV SERVERNAME=localhost
ENV UPLOAD_MAX_FILESIZE=24M
ENV POST_MAX_SIZE=24M
ENV MAX_FILE_UPLOADS=201
RUN apt update && apt install -y gettext-base librsvg2-bin pdftk imagemagick potrace
COPY . /usr/local/signaturepdf
RUN chown -R www-data:www-data /usr/local/signaturepdf && chmod 750 -R /usr/local/signaturepdf && \
cp /usr/local/signaturepdf/php.ini /usr/local/etc/php/conf.d/uploads.ini && \
cat /usr/local/signaturepdf/apache.conf | envsubst > /etc/apache2/sites-available/signaturepdf.conf && \
envsubst < /usr/local/signaturepdf/php.ini > /usr/local/etc/php/conf.d/uploads.ini && \
envsubst < /usr/local/signaturepdf/apache.conf > /etc/apache2/sites-available/signaturepdf.conf && \
a2enmod rewrite && a2ensite signaturepdf
WORKDIR /usr/local/signaturepdf
CMD envsubst < /usr/local/signaturepdf/apache.conf > /etc/apache2/sites-available/signaturepdf.conf && \
envsubst < /usr/local/signaturepdf/php.ini > /usr/local/etc/php/conf.d/uploads.ini && \
chown -R www-data:www-data /usr/local/signaturepdf && chmod 750 -R /usr/local/signaturepdf && \
apache2-foreground

View File

@ -1,3 +1,3 @@
upload_max_filesize = 24M
post_max_size = 24M
max_file_uploads = 201
upload_max_filesize = $UPLOAD_MAX_FILESIZE
post_max_size = $POST_MAX_SIZE
max_file_uploads = $MAX_FILE_UPLOADS