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
This bug report is probably early but it should help on development.
Because it affects: seafileltd/seafile-mc:12.0-latest
I'm new to seafile but I have developing background.
For testing I have set various variables to their own name like this so you can recognize origins:
Looks like there are multiple environment variables for the same setting according to documentation and my code insights:
MYSQL_USER
MYSQL_DB_USER
SEAFILE_MYSQL_DB_USER
Setting all these variables to different values still results in a hardcoded user "seafile": CREATE USER 'seafile'@'%.%.%.%' IDENTIFIED BY 'DB_PASSWORD'
(I've enabled general-log in mariadbd)
That would be ok, but other code uses other variables what results in these errors: Access denied for user 'SEAFILE_MYSQL_DB_USER'@'172.21.0.4' (using password: YES)
Please only allow one scheme. I would recommend to throw warnings if an old or deprecated environment variable is set to avoid silent misconfigurations.
Yeah... These are just warnings but it burnt a lot of my time today finding the root cause of: Error happened during creating seafile admin.
I spent a lot of time today for this and could not get a modified image running to offer PRs. Sorry.
Affects mariadb:latest and mariadb:10.11 with seafileltd/seafile-mc:12.0-latest.
The text was updated successfully, but these errors were encountered:
Thanks for your feedback, we will fix the mysql connect issue.
SEAFILE_MYSQL_DB_USER is used to transfer the db_user to seadoc. If you do not use seadoc, you can ignore this configuration. In Seafile, default db_user is 'seafile'.
INIT_*** is only used for init Seafile. When you have deployed Seafile, you can remove these configurations in .env.
This bug report is probably early but it should help on development.
Because it affects:
seafileltd/seafile-mc:12.0-latest
I'm new to seafile but I have developing background.
For testing I have set various variables to their own name like this so you can recognize origins:
Looks like there are multiple environment variables for the same setting according to documentation and my code insights:
MYSQL_USER
MYSQL_DB_USER
SEAFILE_MYSQL_DB_USER
Setting all these variables to different values still results in a hardcoded user "seafile":
CREATE USER 'seafile'@'%.%.%.%' IDENTIFIED BY 'DB_PASSWORD'
(I've enabled general-log in mariadbd)
Probably because of here:
https://github.com/haiwen/seafile-docker/blob/master/scripts/scripts_12.0/bootstrap.py#L145
That would be ok, but other code uses other variables what results in these errors:
Access denied for user 'SEAFILE_MYSQL_DB_USER'@'172.21.0.4' (using password: YES)
Please only allow one scheme. I would recommend to throw warnings if an old or deprecated environment variable is set to avoid silent misconfigurations.
Also only these ENVs are used:
But previously it looks like it was:
Is there a reason for that breaking old names?
Another minor bug:
A lot of warnings occur in the logs like this (mariadbd verbosity set to 4):
Probably because of missing close() calls after connects for example here: https://github.com/haiwen/seafile-docker/blob/master/scripts/scripts_12.0/setup-seafile-mysql.py#L475
A little bit context manager logic could help a lot:
https://stackoverflow.com/questions/31214658/can-i-use-pymysql-connect-with-with-statement
Yeah... These are just warnings but it burnt a lot of my time today finding the root cause of:
Error happened during creating seafile admin.
I spent a lot of time today for this and could not get a modified image running to offer PRs. Sorry.
Affects
mariadb:latest
andmariadb:10.11
withseafileltd/seafile-mc:12.0-latest
.The text was updated successfully, but these errors were encountered: