Skip to content
Snippets Groups Projects
Commit 606cb6dd authored by Your Name's avatar Your Name
Browse files

WIP

parent 1f33ea50
No related branches found
No related tags found
No related merge requests found
FROM tutum/mysql
......@@ -10,6 +10,11 @@ RUN apt-get update && apt-get install -y \
curl -O "http://builds.piwik.org/piwik.zip" && \
unzip piwik.zip && \
mv /piwik/config /piwik-config && \
sed -i 's/;always_populate_raw_post_data = -1/always_populate_raw_post_data=-1/g' /etc/php5/fpm/php.ini && \
cd /piwik/misc/ && \
curl http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz > GeoLiteCity.dat.gz && \
gunzip GeoLiteCity.dat.gz && \
mv GeoLiteCity.dat GeoIPCity.dat && \
sed -i 's/# exec CMD/# exec CMD\n\/opt\/startup-piwik.sh/g' /opt/entrypoint.sh
# install nginx piwik config
......
......@@ -237,3 +237,17 @@ Add the following JS-Code to your Site -> don't forget to change the URLs ;)
<!-- End Piwik Code -->
EOF
# Put the right MySQL adapter
if ! grep -q adapter /piwik/config/config.ini.php; then
sed -i '/\[database\]/a adapter=MYSQLI' /piwik/config/config.ini.php
fi
# Fix IP behind proxy
if ! grep -q proxy_client_headers /piwik/config/config.ini.php; then
sed -i '/\[General\]/a proxy_client_headers[] = HTTP_X_FORWARDED_FOR' /piwik/config/config.ini.php
fi
if ! grep -q proxy_host_headers /piwik/config/config.ini.php; then
sed -i '/\[General\]/a proxy_host_headers[] = HTTP_X_FORWARDED_HOST' /piwik/config/config.ini.php
fi
......@@ -20,7 +20,7 @@ ExecStart=/bin/bash -euxc ' \
--rm \
--name backup-%i \
-h backup.container \
--cpu-shares=100 \
--cpu-shares=40 \
-v /root:/root \
-v /data/domains/%i:/backup indiepaas/duplicity \
--full-if-older-than 1W \
......
......@@ -37,7 +37,7 @@ ExecStart=/bin/bash -euxc ' \
/bin/docker run \
--rm \
--name backup-%i \
--cpu-shares=100 \
--cpu-shares=40 \
-h backup.container \
-v /root:/root \
-v /data/domains/%i:/backup indiepaas/duplicity \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment