Navigation Menu

Skip to content

Commit

Permalink
Optimize layers
Browse files Browse the repository at this point in the history
Coding style
  • Loading branch information
crazy-max committed Dec 3, 2018
1 parent f4e626b commit c20970d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Expand Up @@ -7,7 +7,7 @@ ARG VERSION
LABEL maintainer="CrazyMax" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="matomo" \
org.label-schema.description="Matomo (formerly Piwik) based on Alpine Linux and Nginx" \
org.label-schema.description="Matomo (formerly Piwik)" \
org.label-schema.version=$VERSION \
org.label-schema.url="https://github.com/crazy-max/docker-matomo" \
org.label-schema.vcs-ref=$VCS_REF \
Expand Down Expand Up @@ -102,14 +102,15 @@ RUN apk --update --no-cache add -t build-dependencies \
&& gpg --import signature.asc \
&& gpg --verify piwik-${MATOMO_VERSION}.tar.gz.asc piwik-${MATOMO_VERSION}.tar.gz \
&& tar -xzf piwik-${MATOMO_VERSION}.tar.gz --strip 1 -C /var/www \
&& chown -R nginx. /etc/nginx /usr/lib/nginx /var/cache/nginx /var/log/nginx /var/log/php7 /var/www \
&& apk del build-dependencies \
&& rm -rf /root/.gnupg /tmp/* /var/cache/apk/*

COPY entrypoint.sh /entrypoint.sh
COPY assets /

RUN chmod a+x /entrypoint.sh /usr/local/bin/* \
&& chown -R nginx. /etc/nginx /usr/lib/nginx /var/cache/nginx /var/log/nginx /var/log/php7 /var/www
&& chown nginx. /var/www/bootstrap.php

EXPOSE 80
WORKDIR /var/www
Expand Down
22 changes: 11 additions & 11 deletions entrypoint.sh
Expand Up @@ -4,20 +4,20 @@ function runas_nginx() {
su - nginx -s /bin/sh -c "$1"
}

TZ=${TZ:-"UTC"}
TZ=${TZ:-UTC}

MEMORY_LIMIT=${MEMORY_LIMIT:-"256M"}
UPLOAD_MAX_SIZE=${UPLOAD_MAX_SIZE:-"16M"}
OPCACHE_MEM_SIZE=${OPCACHE_MEM_SIZE:-"128"}
REAL_IP_FROM=${REAL_IP_FROM:-"0.0.0.0/32"}
REAL_IP_HEADER=${REAL_IP_HEADER:-"X-Forwarded-For"}
MEMORY_LIMIT=${MEMORY_LIMIT:-256M}
UPLOAD_MAX_SIZE=${UPLOAD_MAX_SIZE:-16M}
OPCACHE_MEM_SIZE=${OPCACHE_MEM_SIZE:-128}
REAL_IP_FROM=${REAL_IP_FROM:-0.0.0.0/32}
REAL_IP_HEADER=${REAL_IP_HEADER:-X-Forwarded-For}

LOG_LEVEL=${LOG_LEVEL:-"WARN"}
SIDECAR_CRON=${SIDECAR_CRON:-"0"}
LOG_LEVEL=${LOG_LEVEL:-WARN}
SIDECAR_CRON=${SIDECAR_CRON:-0}

SSMTP_PORT=${SSMTP_PORT:-"25"}
SSMTP_HOSTNAME=${SSMTP_HOSTNAME:-"$(hostname -f)"}
SSMTP_TLS=${SSMTP_TLS:-"NO"}
SSMTP_PORT=${SSMTP_PORT:-25}
SSMTP_HOSTNAME=${SSMTP_HOSTNAME:-$(hostname -f)}
SSMTP_TLS=${SSMTP_TLS:-NO}

# Timezone
echo "Setting timezone to ${TZ}..."
Expand Down

0 comments on commit c20970d

Please sign in to comment.