Hi,
I’m trying to setup seafile through docker. After the first startup, I open the web login page, but when I try to signin with the admin credential (provided to SEAFILE_ADMIN_EMAIL
and SEAFILE_ADMIN_PASSWORD
), it fails with an error message Incorrect email or password
. There is no network issue though (all 200
even /accounts/login/
request responds with 200
). So it’s quite confusing.
Inspecting seafile container’s logs, this seems to be related
Error happened during creating seafile admin.
compose.yml
:
services:
seafile:
image: seafileltd/seafile-mc:latest
container_name: seafile
restart: unless-stopped
environment:
SEAFILE_ADMIN_EMAIL: me@mail.com
SEAFILE_ADMIN_PASSWORD: admin
DB_HOST: seafile-db
DB_ROOT_PASSWD: mysql
SEAFILE_SERVER_LETSENCRYPT: false
ports:
- "12345:80"
volumes:
- /box/seafile:/shared
depends_on:
- seafile-db
- memcached
networks:
- seafile
memcached:
image: memcached:alpine
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile
seafile-db:
image: mysql:latest
container_name: seafile-db
restart: always
environment:
MYSQL_ROOT_PASSWORD: mysql
volumes:
- seafile-db:/var/lib/mysql
networks:
- seafile
volumes:
seafile-db:
networks:
seafile:
When I try to run myself reset-admin.sh
script from inside the container it also fails
$ docker exec -it seafile /opt/seafile/seafile-server-latest/reset-admin.sh
E-mail address: test@test.io
Password:
Password (again):
Traceback (most recent call last):
File "/opt/seafile/seafile-server-10.0.1/seahub/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/seafile/seafile-server-10.0.1/seahub/thirdpart/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/opt/seafile/seafile-server-10.0.1/seahub/thirdpart/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/seafile/seafile-server-10.0.1/seahub/thirdpart/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/seafile/seafile-server-10.0.1/seahub/thirdpart/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/opt/seafile/seafile-server-10.0.1/seahub/seahub/base/management/commands/createsuperuser.py", line 150, in handle
User.objects.create_superuser(email, password)
File "/opt/seafile/seafile-server-10.0.1/seahub/seahub/base/accounts.py", line 71, in create_superuser
u = self.create_user(email, password, is_staff=True, is_active=True)
File "/opt/seafile/seafile-server-10.0.1/seahub/seahub/base/accounts.py", line 61, in create_user
return self.get(email=email)
File "/opt/seafile/seafile-server-10.0.1/seahub/seahub/base/accounts.py", line 99, in get
raise User.DoesNotExist('User matching query does not exits.')
seahub.base.accounts.DoesNotExist: User matching query does not exits.
Am I missing something? Does anyone have a working seafile deployed using latest docker images?
inspecting the mysql
database (inside the db container)
mysql> select user,host from user;
+------------------+-----------+
| user | host |
+------------------+-----------+
| root | % |
| seafile | %.%.%.% | // what is this host ???
| mysql.infoschema | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+------------------+-----------+
6 rows in set (0.00 sec)