Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: add your own config.ini.php #13

Open
gregbkr opened this issue Sep 21, 2015 · 1 comment
Open

Docker: add your own config.ini.php #13

gregbkr opened this issue Sep 21, 2015 · 1 comment

Comments

@gregbkr
Copy link

gregbkr commented Sep 21, 2015

Good evening Piwik team!

Quick docker related question:
How do you load your own /piwik/config/config.ini.php file?
Mapping this file in piwik container run (-v $PWD/config.ini.php:/piwik/config/config.ini.php) makes piwik config fail.

Seems like I can only map it after piwik finished its initialization, doing a simple copy, which add some step.
docker cp $PWD/config.ini.php piwik:/piwik/config/config.ini.php

Is there another cleaner solution or I missed something? I don't wish to create/manage my own container with this only addition.

Thanks a lot for your help.
And very good week! ;-)

Greg.

@MarvAmBass
Copy link
Owner

hey greg,

well there are some mindfucks here 😄

in the build process my predefined config is installed to piwik. But! if you start the container, and the initial setups runs through it, this predefined config is replaced by the one generated by the installer.

so basically my predefined config is never used.

the reason piwik keeps failing after you mount the config from outside the container is, that the piwik startup script is no longer able to replace the file with the generated config.

you chould check my startup piwik script, I currently don't have much time to enhance it to support custom configs. And also I don't see the reason to use a custom config, if the container does everything necessary to create a config automatically. (okay if you need to enable some special features you're right - it's usefull to add special options to the config)

the best but also the hardest reason would be to merge the custom configuration with the generated one. after generation but before piwik boots up.

OR

you search for something like a /piwik/config/custom-config.ini.php.partial and add it's contents to the original generated /piwik/config/config.ini.php shortly before piwik startup.
that would be the easiest and practical solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants