-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quick start not working #421
Comments
Did you build the container manually? The dev dependencies only get installed, if you build with the |
I ran So my second attempt, this time downloading the docker-compose.yml linked from the README.md into a separate folder leads to many more errors, all related to missing configuration: $ docker compose logs db
tmp-db-1 | Error: Database is uninitialized and superuser password is not specified.
tmp-db-1 | You must specify POSTGRES_PASSWORD to a non-empty value for the
tmp-db-1 | superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
tmp-db-1 |
tmp-db-1 | You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
tmp-db-1 | connections without a password. This is *not* recommended.
tmp-db-1 |
tmp-db-1 | See PostgreSQL documentation about "trust":
tmp-db-1 | https://www.postgresql.org/docs/current/auth-trust.html
$ docker compose logs mc
tmp-mc-1 | mc: <ERROR> Invalid secret key `secret`. Invalid arguments provided, please refer `mc <command> -h` for relevant documentation.
tmp-mc-1 | Bucket created successfully `dc-minio/alexandria-media`.
$ docker compose logs minio
tmp-minio-1 | ERROR Unable to validate credentials inherited from the shell environment: Invalid credentials
tmp-minio-1 | > Please provide correct credentials
tmp-minio-1 | HINT:
tmp-minio-1 | Access key length should be at least 3, and secret key length at least 8 characters
$ docker compose logs alexandria
tmp-alexandria-1 | wait-for-it: waiting 15 seconds for db:5432
tmp-alexandria-1 | wait-for-it: timeout occurred after waiting 15 seconds for db:5432
tmp-alexandria-1 | Traceback (most recent call last):
tmp-alexandria-1 | File "/home/alexandria/.cache/pypoetry/virtualenvs/caluma-alexandria-9TtSrW0h-py3.8/lib/python3.8/site-packages/environ/environ.py", line 388, in get_value
tmp-alexandria-1 | value = self.ENVIRON[var_name]
tmp-alexandria-1 | File "/usr/local/lib/python3.8/os.py", line 675, in __getitem__
tmp-alexandria-1 | raise KeyError(key) from None
tmp-alexandria-1 | KeyError: 'SECRET_KEY'
tmp-alexandria-1 |
tmp-alexandria-1 | The above exception was the direct cause of the following exception:
tmp-alexandria-1 |
tmp-alexandria-1 | Traceback (most recent call last):
tmp-alexandria-1 | File "./manage.py", line 12, in <module>
tmp-alexandria-1 | execute_from_command_line(sys.argv)
tmp-alexandria-1 | File "/home/alexandria/.cache/pypoetry/virtualenvs/caluma-alexandria-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
tmp-alexandria-1 | utility.execute()
tmp-alexandria-1 | File "/home/alexandria/.cache/pypoetry/virtualenvs/caluma-alexandria-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
tmp-alexandria-1 | self.fetch_command(subcommand).run_from_argv(self.argv)
tmp-alexandria-1 | File "/home/alexandria/.cache/pypoetry/virtualenvs/caluma-alexandria-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
tmp-alexandria-1 | self.execute(*args, **cmd_options)
tmp-alexandria-1 | File "/home/alexandria/.cache/pypoetry/virtualenvs/caluma-alexandria-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
tmp-alexandria-1 | output = self.handle(*args, **options)
tmp-alexandria-1 | File "/home/alexandria/.cache/pypoetry/virtualenvs/caluma-alexandria-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/core/management/base.py", line 86, in wrapped
tmp-alexandria-1 | saved_locale = translation.get_language()
tmp-alexandria-1 | File "/home/alexandria/.cache/pypoetry/virtualenvs/caluma-alexandria-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/utils/translation/__init__.py", line 254, in get_language
tmp-alexandria-1 | return _trans.get_language()
tmp-alexandria-1 | File "/home/alexandria/.cache/pypoetry/virtualenvs/caluma-alexandria-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/utils/translation/__init__.py", line 57, in __getattr__
tmp-alexandria-1 | if settings.USE_I18N:
tmp-alexandria-1 | File "/home/alexandria/.cache/pypoetry/virtualenvs/caluma-alexandria-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/conf/__init__.py", line 82, in __getattr__
tmp-alexandria-1 | self._setup(name)
tmp-alexandria-1 | File "/home/alexandria/.cache/pypoetry/virtualenvs/caluma-alexandria-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/conf/__init__.py", line 69, in _setup
tmp-alexandria-1 | self._wrapped = Settings(settings_module)
tmp-alexandria-1 | File "/home/alexandria/.cache/pypoetry/virtualenvs/caluma-alexandria-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/conf/__init__.py", line 170, in __init__
tmp-alexandria-1 | mod = importlib.import_module(self.SETTINGS_MODULE)
tmp-alexandria-1 | File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
tmp-alexandria-1 | return _bootstrap._gcd_import(name[level:], package, level)
tmp-alexandria-1 | File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
tmp-alexandria-1 | File "<frozen importlib._bootstrap>", line 991, in _find_and_load
tmp-alexandria-1 | File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
tmp-alexandria-1 | File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
tmp-alexandria-1 | File "<frozen importlib._bootstrap_external>", line 843, in exec_module
tmp-alexandria-1 | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
tmp-alexandria-1 | File "/app/alexandria/settings/django.py", line 8, in <module>
tmp-alexandria-1 | SECRET_KEY = env.str("SECRET_KEY", default=default("uuuuuuuuuu"))
tmp-alexandria-1 | File "/home/alexandria/.cache/pypoetry/virtualenvs/caluma-alexandria-9TtSrW0h-py3.8/lib/python3.8/site-packages/environ/environ.py", line 213, in str
tmp-alexandria-1 | value = self.get_value(var, cast=str, default=default)
tmp-alexandria-1 | File "/home/alexandria/.cache/pypoetry/virtualenvs/caluma-alexandria-9TtSrW0h-py3.8/lib/python3.8/site-packages/environ/environ.py", line 392, in get_value
tmp-alexandria-1 | raise ImproperlyConfigured(error_msg) from exc
tmp-alexandria-1 | django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable |
And when calling docker compose build --pull alexandria
docker compose up -d This only affects the dev setup with the override file. If I'm correct, then the README is missing this information. |
To be a bit more clear: When running it with the override compose file, the config set there depends on the dev dependencies. They are only installed if the image was also built with the override file. |
Yes this works from within the repo, thanks! So I guess instead of suggesting to download the After installing and configuring those, clone this repo and run the following commands:
echo UID=$UID > .env
docker compose build --pull alexandria
docker compose up -d |
We should differentiate between getting an Alexandria instance running and getting a dev instance running. In README.mdFor a production instance, it's not necessary to clone the repo. You just need a correct compose file. For good reasons, the main compose file doesn't set all the env vars necessary to bring up the project. As you saw, when it complained about the missing We should rethink our approach here. Some configuration is needed, before you can spin up an instance, as we don't want to hardcode secrets in the main compose file. Typically, when using Alexandria, I would create additional compose files. We could add a docker compose -f docker-compose.demo.yml up -d And also make clear that this will spin up a demo instance that is not safe for production. What do you think @winged? In CONTRIBUTING.mdHow to get a dev setup running is described in # needed for permission handling
# only needs to be run once
echo UID=$UID > .env
# build image with dev dependencies
docker compose build --pull alexandria
# open shell
docker compose run --rm alexandria bash Would be nice, if you could prepare a PR with this change. |
What I did:
UID=<my user ID>
to the .env filedocker compose up -d
make load_example_data
What happened:
After step 3 I get the following
docker ps
output:As you can see, no service at port 8000.
Step 4 gives a stack trace ending in
ModuleNotFoundError: No module named 'django_extensions'
The text was updated successfully, but these errors were encountered: