Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

Commit

Permalink
Add docker-entrypoint.sh and php.ini to update.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
J0WI authored and pierreozoux committed May 15, 2018
1 parent edd76a3 commit ead2c41
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ RUN set -ex; \
tar -xzf piwik.tar.gz -C /usr/src/; \
rm piwik.tar.gz

COPY php.ini /usr/local/etc/php/php.ini
COPY php.ini /usr/local/etc/php/conf.d/php-piwik.ini

RUN set -ex; \
curl -fsSL -o /usr/src/piwik/misc/GeoIPCity.dat.gz https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz; \
Expand Down
2 changes: 1 addition & 1 deletion apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ RUN set -ex; \
tar -xzf piwik.tar.gz -C /usr/src/; \
rm piwik.tar.gz

COPY php.ini /usr/local/etc/php/php.ini
COPY php.ini /usr/local/etc/php/conf.d/php-piwik.ini

RUN set -ex; \
curl -fsSL -o /usr/src/piwik/misc/GeoIPCity.dat.gz https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz; \
Expand Down
9 changes: 9 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -e

if [ ! -e piwik.php ]; then
tar cf - --one-file-system -C /usr/src/piwik . | tar xf -
chown -R www-data .
fi

exec "$@"
2 changes: 1 addition & 1 deletion fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ RUN set -ex; \
tar -xzf piwik.tar.gz -C /usr/src/; \
rm piwik.tar.gz

COPY php.ini /usr/local/etc/php/php.ini
COPY php.ini /usr/local/etc/php/conf.d/php-piwik.ini

RUN set -ex; \
curl -fsSL -o /usr/src/piwik/misc/GeoIPCity.dat.gz https://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz; \
Expand Down
3 changes: 3 additions & 0 deletions php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
always_populate_raw_post_data=-1
geoip.custom_directory=/var/www/html/misc
display_errors=Off
2 changes: 2 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ set -x

for variant in apache fpm; do
cp Dockerfile.template "$variant/Dockerfile"
cp docker-entrypoint.sh "$variant/docker-entrypoint.sh"
cp php.ini "$variant/php.ini"
sed -ri -e '
s/%%VARIANT%%/'"$variant"'/;
s/%%VERSION%%/'"$latest"'/;
Expand Down

0 comments on commit ead2c41

Please sign in to comment.