|
@@ -14,6 +14,7 @@ RUN if [ ${CHANGE_SOURCE} = true ]; then \
|
|
|
|
|
|
RUN apk update \
|
|
|
&& apk upgrade \
|
|
|
+ && apk --update add logrotate \
|
|
|
&& apk add --no-cache openssl \
|
|
|
&& apk add --no-cache bash \
|
|
|
&& adduser -D -H -u 1000 -s /bin/bash www-data
|
|
@@ -21,6 +22,12 @@ RUN apk update \
|
|
|
ARG PHP_UPSTREAM_CONTAINER=php-fpm
|
|
|
ARG PHP_UPSTREAM_PORT=9000
|
|
|
|
|
|
+# Create 'messages' file used from 'logrotate'
|
|
|
+RUN touch /var/log/messages
|
|
|
+
|
|
|
+# Copy 'logrotate' config file
|
|
|
+COPY logrotate/nginx /etc/logrotate.d/
|
|
|
+
|
|
|
# Set upstream conf and remove the default conf
|
|
|
RUN echo "upstream php-upstream { server ${PHP_UPSTREAM_CONTAINER}:${PHP_UPSTREAM_PORT}; }" > /etc/nginx/conf.d/upstream.conf \
|
|
|
&& rm /etc/nginx/conf.d/default.conf
|