docker icon indicating copy to clipboard operation
docker copied to clipboard

seeing install page again after i restarted matomo docker

Open babatundebusari opened this issue 5 years ago • 8 comments

How can i make matomo not go back to install page when i restart my docker containers?

What is login to bring up install page to install from scratch. I already have an up and running matomo and i expect it to just continue from old install but upon restart of containers it goes back to install page again. Do i have to delete a file or what is logic behind this?

Will i to know so i can fix this issue. Thanks

babatundebusari avatar Dec 22 '18 19:12 babatundebusari

still need help here i restarted docker container of already installed matomo and it takes me to installation setup page it should just take me to my already setup matomo

here in this script https://github.com/matomo-org/docker/blob/master/fpm/docker-entrypoint.sh it shows it only looks for piwik.php existing and no new installation if piwik.php exists

so why am i taken to the installation setup page with just a docker restart??? how can i override this installation page and go straight to the already setup page???

babatundebusari avatar Dec 31 '18 10:12 babatundebusari

Hi, I don't know how the docker container works and am only on my phone, but a quick note: Matomo shows the installer when config/config.INI.php doesn't exist and just runs the application when it does exist.

Findus23 avatar Dec 31 '18 11:12 Findus23

so in that case..the logic to check piwik.php is wrong then..it should instead check the file you mentioned which is config/config.ini.php file

i will update my dockerfile setup to use that file you mentioned in my logic and see what happens

thanks for the quick response

babatundebusari avatar Dec 31 '18 11:12 babatundebusari

@Findus23

anyway i can create that file to go back to my existing data? or that is not good idea?

i don't want to lose my old data since i am now on this new installation setup page

babatundebusari avatar Dec 31 '18 11:12 babatundebusari

ok i was able to retrieve old website/data by telling installation setup to reuse existing tables in database

issue now is what happened to the config/config.ini.php file and it seems it got deleted somehow during restart of the docker container

looking at my setup since piwik.php file was available, so new files were downloaded but for some reason the config/config.ini.php file was gone and that is why it went back to installation page

So seems there is something else controlling the logic to redirect to installation page Need to know that logic so i can fix this properly

babatundebusari avatar Dec 31 '18 11:12 babatundebusari

As long as you have the MySQL database you don't loose any data. Even if you don't have the config/config.ini.php file any more, you can just go through the setup again, enter the database details of the database with the existing data (pay attention to use the same prefix) and the setup should detect it and just create the config/config.ini.php file.

Findus23 avatar Dec 31 '18 12:12 Findus23

@babatundebusari To avoid lossing your config each time you should use a volume to store written data...

If there was some variables during the installation you wouldn't need to save the file that way. You can find other images of matomo allowing you to pass your MariaDB/MySQL config as environment variables.

night-gold avatar Apr 10 '19 09:04 night-gold

As of now, the docker image of Matomo support passing variables (like MATOMO_DATABASE_HOST, MATOMO_DATABASE_USERNAME...etc), but are only placeholders for the configuration screen. That means, that we still need to either create a volume with all configuration files, or redo the config each time it restart.

Also, the fact that a container reverts to the default state on reboot is the basic behavior to me.

I think this issue can be closed

Luxiorawa avatar Nov 24 '21 10:11 Luxiorawa

Unfortunately there is no way to install Matomo from CLI https://github.com/matomo-org/matomo/issues/10257

J0WI avatar Nov 26 '22 15:11 J0WI