MarvAmBass / docker-piwik

⚠️ DEPRECATED ::: A Docker Piwik Container
MIT License
29 stars 26 forks source link

after stop and start the container again, all /piwiki/ folder is deleted #11

Closed wagnerpinheiro closed 9 years ago

wagnerpinheiro commented 9 years ago

The bug was introduced in commit 775e02a6944dcd8131f5613cf3bf45ef80cdd755

gregbkr commented 9 years ago

Hello everyone,

If it can help, I noticed that issue from the latest container: marvambass/piwik Both are due to the $PIWIK_RELATIVE_URL_ROOT containing at the end a "/" which make some code bugged.

When launching marvambass/piwik, I map at start the modified /opt/startup-piwik.sh

Let me know if this was the issue and if a modification could be implemented in the next version.

Thanks in all case for your work on that container, it is a very cool product! ;-)

Good evening there! Greg.

MarvAmBass commented 9 years ago

sorry guys but I can't reproduce this error, I've tried a lot of different approaches but it works every time without a problem

gregbkr commented 9 years ago

Hello,

Here are the steps I used, hope it helps:

1 MYSQL with piwik db

docker run -d --name mysql \ -e MYSQL_ROOT_PASSWORD=pw \ -e MYSQL_USER=dbadmin \ -e MYSQL_PASSWORD=pw \ -e MYSQL_DATABASE=piwik \ mysql

2 Simple web page (with the piwik code):

docker run --name web -p 80:80 -d \ -v $PWD/index.html:/usr/share/nginx/html/index.html \ nginx

3 PIWIK

docker run -d -p 81:80 \ --link mysql:mysql --name piwik \ -e PIWIK_MYSQL_USER=dbadmin \ -e PIWIK_MYSQL_PASSWORD=pw \ marvambass/piwik

4 Add trusted_hosts[] = "dev.local:81". Have to do this way because mapping this file in piwik container makes piwik fail.

docker cp $PWD/config.ini.php piwik:/piwik/config/config.ini.php

I am using docker v1.8.1. Container marvambass/piwik inspect: "Id": "8604b226b64a9572ae861db215c4fcd5a60356d32a0e279841d1d1bef0b4d887", "Parent": "68119dbe4a91c48dd5d653db20872a87e6317216a133f4ee4d87713cbef8528b", "Comment": "", "Created": "2015-08-25T18:50:33.995752183Z", "Container": "cf968b73b8f5cbd2112344c17c8fb79ec7af9a73a8f79697e50b76efa34191ac"

Everything is working fine your the modified version of startup-piwik.sh.

Thank you and good evening! Greg.

gregbkr commented 9 years ago

New version is working, thanks a lot! ;-)