You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to run seafile with an existing MySQL server instead of spinning up an extra MariaDB docker container just for that.
According to this manual I'd have to create three databases (ccnet_db, seafile_db, seahub_db) and a user. (I don't have root rights on my SQL server, therefore using method two.)
Now I'm wondering if it is possible to pass information like host server and database names as well as the user credentials to seafile using env variables.
Obviously I could just follow the manual but I'd like to keep running seafile and everything else inside a container just not the database.
Thanks for your help
Alex
The text was updated successfully, but these errors were encountered:
somebody asked this over at reddit. It sounded like it was quite a hassle for him but it is doable. First you need to make sure that seafile-server and seahub can access the external database, by not declaring their network as internal or by defining an additional external network.
In initialization, seafile takes the root credentials from the environment variables and initializes the database by creating the tables and a db user. The user is always called seafile and has a randomly generated password. The db host as well as the created db credentials are written into seahub.conf, ccnet.conf and seahub_settings.py.
So you can only define the db host and db root user for first initialization. Once this is done, those variables do nothing. If you would have root access, you could simply leave the db service out and define your server and credentials instead. Without root access, it's getting tricky though.
I would try to run the first setup with the db service such that it generates the whole config. Then change the db host in all three config files and create a user in your db that matches the username and password in the config files. Then throw out the db service and redeploy. You might also need to copy over the contents of the tables. Though it could be that simply creating the empty tables is enough. I'm not sure about this.
Hi Gerrit,
I'd like to run seafile with an existing MySQL server instead of spinning up an extra MariaDB docker container just for that.
According to this manual I'd have to create three databases (ccnet_db, seafile_db, seahub_db) and a user. (I don't have root rights on my SQL server, therefore using method two.)
Now I'm wondering if it is possible to pass information like host server and database names as well as the user credentials to seafile using env variables.
Obviously I could just follow the manual but I'd like to keep running seafile and everything else inside a container just not the database.
Thanks for your help
Alex
The text was updated successfully, but these errors were encountered: