mirror of
https://github.com/24eme/signaturepdf.git
synced 2023-08-25 09:33:08 +02:00
chore(docker): fix dockerbuild permission issue
This commit is contained in:
parent
de66c05f2a
commit
c119d8d1cd
@ -4,7 +4,7 @@ ENV SERVERNAME=localhost
|
|||||||
ENV UPLOAD_MAX_FILESIZE=24M
|
ENV UPLOAD_MAX_FILESIZE=24M
|
||||||
ENV POST_MAX_SIZE=24M
|
ENV POST_MAX_SIZE=24M
|
||||||
ENV MAX_FILE_UPLOADS=201
|
ENV MAX_FILE_UPLOADS=201
|
||||||
ENV PDF_STORAGE_PATH=
|
ENV PDF_STORAGE_PATH=/data
|
||||||
ENV DISABLE_ORGANIZATION=false
|
ENV DISABLE_ORGANIZATION=false
|
||||||
ENV PDF_DEMO_LINK=true
|
ENV PDF_DEMO_LINK=true
|
||||||
|
|
||||||
@ -14,15 +14,11 @@ RUN apt update && \
|
|||||||
|
|
||||||
COPY . /usr/local/signaturepdf
|
COPY . /usr/local/signaturepdf
|
||||||
|
|
||||||
RUN chown -R www-data:www-data /usr/local/signaturepdf && chmod 750 -R /usr/local/signaturepdf && \
|
RUN envsubst < /usr/local/signaturepdf/config/php.ini > /usr/local/etc/php/conf.d/uploads.ini && \
|
||||||
chmod 775 -R /usr/local/signaturepdf/entrypoint.sh && \
|
|
||||||
envsubst < /usr/local/signaturepdf/config/php.ini > /usr/local/etc/php/conf.d/uploads.ini && \
|
|
||||||
envsubst < /usr/local/signaturepdf/config/apache.conf > /etc/apache2/sites-available/signaturepdf.conf && \
|
envsubst < /usr/local/signaturepdf/config/apache.conf > /etc/apache2/sites-available/signaturepdf.conf && \
|
||||||
envsubst < /usr/local/signaturepdf/config/config.ini.tpl > /usr/local/signaturepdf/config/config.ini && \
|
envsubst < /usr/local/signaturepdf/config/config.ini.tpl > /usr/local/signaturepdf/config/config.ini && \
|
||||||
a2enmod rewrite && a2ensite signaturepdf
|
a2enmod rewrite && a2ensite signaturepdf
|
||||||
|
|
||||||
WORKDIR /usr/local/signaturepdf
|
WORKDIR /usr/local/signaturepdf
|
||||||
|
|
||||||
USER www-data
|
|
||||||
|
|
||||||
CMD /usr/local/signaturepdf/entrypoint.sh
|
CMD /usr/local/signaturepdf/entrypoint.sh
|
||||||
|
@ -95,9 +95,9 @@ Les variables suivantes permettent de configurer le déployement :
|
|||||||
|`UPLOAD_MAX_FILESIZE`|Taille maximum du fichier PDF à signer|48M|24M|
|
|`UPLOAD_MAX_FILESIZE`|Taille maximum du fichier PDF à signer|48M|24M|
|
||||||
|`POST_MAX_SIZE`|Taille maximum du fichier PDF à signer|48M|24M|
|
|`POST_MAX_SIZE`|Taille maximum du fichier PDF à signer|48M|24M|
|
||||||
|`MAX_FILE_UPLOADS`|Nombre de pages maximum du PDF, ici 200 pages + le PDF d'origine|401|201|
|
|`MAX_FILE_UPLOADS`|Nombre de pages maximum du PDF, ici 200 pages + le PDF d'origine|401|201|
|
||||||
|`PDF_STORAGE_PATH`|chemin vers lequel les fichiers pdf uploadés pourront être stockés|/data||
|
|
||||||
|`DISABLE_ORGANIZATION`|Desactiver la route Organiser|true|false|
|
|`DISABLE_ORGANIZATION`|Desactiver la route Organiser|true|false|
|
||||||
|`PDF_DEMO_LINK`|Afficher, retirer ou changer le lien de PDF de démo|false, `link` or `relative path`|true|
|
|`PDF_DEMO_LINK`|Afficher, retirer ou changer le lien de PDF de démo|false, `link` or `relative path`|true|
|
||||||
|
| `PDF_STORAGE_PATH` | chemin vers lequel les fichiers pdf uploadés pourront être stockés | /data | /data |
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -d --name=signaturepdf -p 8080:80 -e SERVERNAME=pdf.example.org -e UPLOAD_MAX_FILESIZE=48M -e POST_MAX_SIZE=48M -e MAX_FILE_UPLOADS=401 -e PDF_STORAGE_PATH=/data signaturepdf
|
docker run -d --name=signaturepdf -p 8080:80 -e SERVERNAME=pdf.example.org -e UPLOAD_MAX_FILESIZE=48M -e POST_MAX_SIZE=48M -e MAX_FILE_UPLOADS=401 -e PDF_STORAGE_PATH=/data signaturepdf
|
||||||
|
6
entrypoint.sh
Normal file → Executable file
6
entrypoint.sh
Normal file → Executable file
@ -1,17 +1,11 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
envsubst < /usr/local/signaturepdf/config/apache.conf > /etc/apache2/sites-available/signaturepdf.conf
|
envsubst < /usr/local/signaturepdf/config/apache.conf > /etc/apache2/sites-available/signaturepdf.conf
|
||||||
|
|
||||||
envsubst < /usr/local/signaturepdf/config/php.ini > /usr/local/etc/php/conf.d/uploads.ini
|
envsubst < /usr/local/signaturepdf/config/php.ini > /usr/local/etc/php/conf.d/uploads.ini
|
||||||
|
|
||||||
envsubst < /usr/local/signaturepdf/config/config.ini.tpl > /usr/local/signaturepdf/config/config.ini
|
envsubst < /usr/local/signaturepdf/config/config.ini.tpl > /usr/local/signaturepdf/config/config.ini
|
||||||
|
|
||||||
chown -R www-data:www-data /usr/local/signaturepdf && chmod 750 -R /usr/local/signaturepdf
|
|
||||||
|
|
||||||
if [[ ! -z $PDF_STORAGE_PATH ]] ; then
|
if [[ ! -z $PDF_STORAGE_PATH ]] ; then
|
||||||
mkdir -p $PDF_STORAGE_PATH
|
mkdir -p $PDF_STORAGE_PATH
|
||||||
chown -R www-data:www-data $PDF_STORAGE_PATH
|
|
||||||
chmod 750 -R $PDF_STORAGE_PATH
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apache2-foreground
|
apache2-foreground
|
||||||
|
Loading…
Reference in New Issue
Block a user