- changed volumes to be local to the repo
- added volumes/ dir in gitignore
This commit is contained in:
@@ -22,14 +22,14 @@ RUN adduser -S www-data && \
|
||||
|
||||
# ARG variables are not persistent after the build process, in opposite to ENV
|
||||
ARG WP_URL
|
||||
ARG MAX_UPLOAD_SIZE
|
||||
ARG WP_VOLUME_DIR
|
||||
ARG NG_VOLUME_CERTS
|
||||
ARG SERVER_MAX_UPLOAD_SIZE
|
||||
|
||||
# replace WP_URL
|
||||
RUN sed -i "s/\${WP_URL}/${WP_URL}/g" /etc/nginx/http.d/nginx_http_server.conf
|
||||
# replace max file size upload
|
||||
RUN sed -i "s/\(client_max_body_size \).*\(m;\)/\1${MAX_UPLOAD_SIZE}\2/g" /etc/nginx/nginx.conf
|
||||
RUN sed -i "s/\(client_max_body_size \).*\(m;\)/\1${SERVER_MAX_UPLOAD_SIZE}\2/g" /etc/nginx/nginx.conf
|
||||
|
||||
# create ssl certificates
|
||||
# command openssl :
|
||||
|
||||
@@ -26,14 +26,13 @@ RUN rm -rf /var/lib/apt/lists/*
|
||||
COPY ./conf/www.conf /etc/php7/php-fpm.d/
|
||||
RUN mkdir /run/php/
|
||||
|
||||
ARG WP_VOLUME_DIR
|
||||
ARG MAX_UPLOAD_SIZE
|
||||
ARG EXECUTION_TIME
|
||||
ARG SERVER_MAX_UPLOAD_SIZE
|
||||
ARG SERVER_EXECUTION_TIME
|
||||
|
||||
# replace max file size upload and execution time
|
||||
RUN sed -i "s/\(upload_max_filesize = \).*\(M\)/\1${MAX_UPLOAD_SIZE}\2/g" /etc/php7/php.ini && \
|
||||
sed -i "s/\(post_max_size = \).*\(M\)/\1${MAX_UPLOAD_SIZE}\2/g" /etc/php7/php.ini && \
|
||||
sed -i "s/\(max_execution_time = \).*/\1${EXECUTION_TIME}/g" /etc/php7/php.ini
|
||||
RUN sed -i "s/\(upload_max_filesize = \).*\(M\)/\1${SERVER_MAX_UPLOAD_SIZE}\2/g" /etc/php7/php.ini && \
|
||||
sed -i "s/\(post_max_size = \).*\(M\)/\1${SERVER_MAX_UPLOAD_SIZE}\2/g" /etc/php7/php.ini && \
|
||||
sed -i "s/\(max_execution_time = \).*/\1${SERVER_EXECUTION_TIME}/g" /etc/php7/php.ini
|
||||
|
||||
# create www-data user and add to group
|
||||
RUN adduser -S www-data && \
|
||||
|
||||
Reference in New Issue
Block a user