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

external mysql #10

Open
toastbrotch opened this issue Nov 9, 2017 · 8 comments
Open

external mysql #10

toastbrotch opened this issue Nov 9, 2017 · 8 comments

Comments

@toastbrotch
Copy link

toastbrotch commented Nov 9, 2017

would be very nice if one could inject an external db-server (hostname, credentials, db-names)

@davydov-vyacheslav
Copy link

+1
having the same issue/question

@nelg
Copy link

nelg commented Feb 5, 2018

+1 and allow disable of Adminer when external

@InfiniteLukeOne
Copy link

Documentation for installing iRedMail with external mysql server is here: https://docs.iredmail.org/install.iredmail.with.remote.mysql.server.html

I would suggest creating a second Docker image for this purpose, even if most of the files can be shared.

@lejmr
Copy link
Owner

lejmr commented Apr 4, 2018

As an insider, extra image is not necessary. The only trick is to trick startup scripts. Startup scripts overwrite "default" values of passwords by values from /opt/iredmail/.cv... For external mysql server config-get needs to be modified as well, and thoroughly tested..

I am very bad with time now, so I am looking forward to receive a pull-request.. Thank you

@twelsby
Copy link
Contributor

twelsby commented Apr 6, 2018

I have an apparently working solution to this but need to do a bit more testing before I submit a pull request. It involves patching the relevant config files during the initial boot. So far this is working well with an external MariaDB container, but should work with MySql as well.

@lejmr
Copy link
Owner

lejmr commented Apr 6, 2018

Perfect, I am just updating for the latest version of iredmail.. maybe we can release it together :-) I would test your setup with updates of the database which takes place at every release...

@toastbrotch
Copy link
Author

looking forward to the pull request. i think it should not take care where the db actually is, this is the responsibility of the user that wants to run the container with an external db. i just need a way to define my own db.

does it actually work by setting all those env-vars here https://docs.iredmail.org/install.iredmail.with.remote.mysql.server.html#install-iredmail

@lejmr
Copy link
Owner

lejmr commented Jan 12, 2020

I have just rewrite the starting mechanism due to phusion image got terribly old. The container is migrated to centos:7 base image, and supervisord is used for dealing with services.

Mysql was upgraded to MariaDB which is just a minor update. Importantly, all database preparation is in mariadb-server service which can be disabled at the startup through entrypoint.sh. Then every service will need to validated to usage of localhost.

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

6 participants