1) Something sets the DBUSER in the .env file to "docker" instead of "librephotos"
2) the secret key isn't placed in the .env file, so librephotos-cli doesn't work until you place it there.
Once I fixed that, I was able to bring the server up and everything looks more or less functional. I ran a scan from the command line though, and got this (even though in the logs, it seemed to scan just fine:
root@pictures:~# librephotos-cli scan
Traceback (most recent call last):
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django_cryptography/core/signing.py", line 237, in unsign
self.signature(signed_value[:-d_size]).verify(sig)
File "/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/hmac.py", line 70, in verify
ctx.verify(signature)
File "/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/hmac.py", line 76, in verify
raise InvalidSignature("Signature did not match digest.")
cryptography.exceptions.InvalidSignature: Signature did not match digest.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/librephotos/backend/manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/core/management/base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/usr/lib/librephotos/backend/api/management/commands/scan.py", line 35, in handle
for user in User.objects.all():
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/models/query.py", line 287, in __iter__
self._fetch_all()
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/models/query.py", line 1308, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/models/query.py", line 70, in __iter__
for row in compiler.results_iter(results):
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1100, in apply_converters
value = converter(value, expression, connection)
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django_cryptography/fields.py", line 173, in from_db_value
return self._load(force_bytes(value))
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django_cryptography/fields.py", line 115, in _load
return pickle.loads(self._fernet.decrypt(value, self.ttl))
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django_cryptography/utils/crypto.py", line 143, in decrypt
data = self._signer.unsign(data, ttl)
File "/usr/lib/librephotos/.local/lib/python3.9/site-packages/django_cryptography/core/signing.py", line 239, in unsign
raise BadSignature(
django.core.signing.BadSignature: Signature "XXXXXXXXX\n'" does not match
I got it working, but had to hack some things:
1) Something sets the DBUSER in the .env file to "docker" instead of "librephotos" 2) the secret key isn't placed in the .env file, so librephotos-cli doesn't work until you place it there.
Once I fixed that, I was able to bring the server up and everything looks more or less functional. I ran a scan from the command line though, and got this (even though in the logs, it seemed to scan just fine: