Reputation: 41
I have installed the tracking tool Piwik as a Heroku App. It works fine but after ~ 2 days, if I visit the app url, I must go through the installation stepts again.
The DB is still remaining, so if I tell Piwik during the installation to use this DB, everything is fine.
I have no idea why this is happening.
Does anyone have an idea or a similar problem?
Upvotes: 3
Views: 410
Reputation: 41
Thanks for your answer André !
I solved the problem in the following way:
[database]
host = 'your db host'
username = 'your db user'
password = 'your db password'
dbname = 'your db name'
tables_prefix =piwik_
port = 3306
adapter = PDO\MYSQL
type = InnoDB
schema = Mysql
[General]
session_save_handler = dbtable
force_ssl = 1
Now, everytime Heroku kills and restarts a dyno, Piwik will get the DB connection data from the config.ini.php file.
Upvotes: 1
Reputation: 2142
The Heroku file system is ephemeral and Heorku dynos are killed every day. I guess you've installed Piwik on the running dyno, which writes Piwik's configuration to the file system. When the dyno is killed by Heroku, this configuration is lost. The newly started dyno does not know the configuration you made and asks you to install it again.
The solution to this is to provide all the things that happen during the installation either within the git repo that is being pulled by Heroku or during the build of the container.
Upvotes: 1