Hello everyone,
I am trying to get SeaTable docker (seafileltd/seatable:latest) to run on a Synology NAS, which will only be accessed locally.
The NAS’ ip address is 10.0.0.10
.
The ports 80
and 443
are already in use and can’t be used for SeaTable, so I want to map 9080
and 9443
to the respective internal ports of the SeaTable docker.
The folder should be /volume1/docker/seatable/
.
My docker-compose.yml
looks as follows:
version: "2.0"
services:
db:
image: mariadb:10.4
container_name: seatable-mysql
environment:
- MYSQL_ROOT_PASSWORD=mypassword
- MYSQL_LOG_CONSOLE=true
volumes:
- /volume1/docker/seatable/mysql-data:/var/lib/mysql
networks:
- seatable-net
memcached:
image: memcached:1.5.6
container_name: seatable-memcached
entrypoint: memcached -m 256
networks:
- seatable-net
redis:
image: redis:5.0.7
container_name: seatable-redis
networks:
- seatable-net
seatable:
image: seatable/seatable:latest
container_name: seatable
ports:
- "9080:80"
- "9443:443"
volumes:
- /volume1/docker/seatable/seatable-data:/shared
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=mypassword
- SEATABLE_SERVER_LETSENCRYPT=False
- SEATABLE_SERVER_HOSTNAME=10.0.0.10
- TIME_ZONE=UTC
depends_on:
- db
- memcached
- redis
networks:
- seatable-net
networks:
seatable-net:
Running dock-compose up -d
will spin up the docker files seemingly without any issues:
Starting seatable-mysql ... done
Starting seatable-memcached ... done
Starting seatable-redis ... done
Starting seatable ... done
Following this guide I ran the start script:
docker exec -d seatable /shared/seatable/scripts/seatable.sh start
…which executes without errors.
Then I ran:
docker exec -it seatable /shared/seatable/scripts/seatable.sh superuser
… which at first asked for my mail address and password. After repeating the password it stops and displays the following traceback / errors:
E-mail address: user@domain.com
Password:
Password (again):
Traceback (most recent call last):
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/backends/mysql/base.py", line 101, in execute
return self.cursor.execute(query, args)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/cursors.py", line 170, in execute
result = self._query(query)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/cursors.py", line 328, in _query
conn.query(q)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/connections.py", line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/connections.py", line 732, in _read_query_result
result.read()
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/connections.py", line 1075, in read
first_packet = self.connection._read_packet()
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/connections.py", line 684, in _read_packet
packet.check_error()
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, "Table 'dtable_db.profile_profile' doesn't exist")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/opt/seatable/seatable-server-1.3.0/dtable-web/seahub/base/management/commands/createsuperuser.py", line 150, in handle
User.objects.create_superuser(email, password)
File "/opt/seatable/seatable-server-1.3.0/dtable-web/seahub/base/accounts.py", line 138, in create_superuser
u = self.create_user(email, password, is_staff=True, is_active=True)
File "/opt/seatable/seatable-server-1.3.0/dtable-web/seahub/base/accounts.py", line 69, in create_user
Profile.objects.add_or_update(username=virtual_id, contact_email=email)
File "/opt/seatable/seatable-server-1.3.0/dtable-web/seahub/profile/models.py", line 29, in add_or_update
profile = self.get(user=username)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/models/query.py", line 374, in get
num = len(clone)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/models/query.py", line 232, in __len__
self._fetch_all()
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/models/query.py", line 1121, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/models/query.py", line 53, in __iter__
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/models/sql/compiler.py", line 899, in execute_sql
raise original_exception
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/models/sql/compiler.py", line 889, in execute_sql
cursor.execute(sql, params)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/django/db/backends/mysql/base.py", line 101, in execute
return self.cursor.execute(query, args)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/cursors.py", line 170, in execute
result = self._query(query)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/cursors.py", line 328, in _query
conn.query(q)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/connections.py", line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/connections.py", line 732, in _read_query_result
result.read()
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/connections.py", line 1075, in read
first_packet = self.connection._read_packet()
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/connections.py", line 684, in _read_packet
packet.check_error()
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "/opt/seatable/seatable-server-latest/dtable-web/thirdpart/pymysql/err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
django.db.utils.ProgrammingError: (1146, "Table 'dtable_db.profile_profile' doesn't exist")
I am not sure what is causing the issue with dtable or the database setup.
I also tried to run the other commands of the seatable.sh
script.
docker exec -it seatable /shared/seatable/scripts/seatable.sh init-sql
… results in:
mysql server is ready
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1007 (HY000) at line 1: Can't create database 'ccnet_db'; database exists
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1007 (HY000) at line 1: Can't create database 'seafile_db'; database exists
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1007 (HY000) at line 1: Can't create database 'dtable_db'; database exists
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1050 (42S01) at line 15: Table 'activities' already exists
Init sql success
And running docker exec -it seatable /shared/seatable/scripts/seatable.sh init
… will just return:
Init config success
I’m very thankful for every helpful hint.
Thanks a lot in advance!