openlegaldata/oldp

Docker issues

Closed this issue · 1 comments

Dear Maintainers, I wanted to get involved in the developement / have a look at the project.
Since I prefer not to install everything locally, I wanted to use docker for a test deployment.

1. docker-compose up

app_1     | usage: gunicorn [OPTIONS] [APP_MODULE]
app_1     | gunicorn: error: unrecognized arguments: oldp.wsgi:application

Which corresponds to this line in the code:

CMD ["gunicorn", "--bind", "0.0.0.0:8000", "oldp.wsgi:application"]

2. docker-compose build

Since I tried to fix the issue in 1), I changed the line mentioned above but then saw, that the container does not build.

$ sudo docker-compose build                                                                                              
[...]
Step 14/18 : RUN python manage.py collectstatic --no-input
 ---> Running in c6bac8bbfe6e
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 357, in execute
    django.setup()
  File "/usr/local/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.6/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/usr/local/lib/python3.6/site-packages/django/apps/config.py", line 90, in create
    module = import_module(entry)
  File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django_extensions'
ERROR: Service 'app' failed to build: The command '/bin/sh -c python manage.py collectstatic --no-input' returned a non-zero code: 1

3. Documentation

I have either misread the documentation or it is incomplete here in the part where it says:

mkdir -p ./data/es
mkdir -p ./data/mysql
chmod 777 ./data/es
chmod 777 ./data/mysql

Since the correct path should be ./docker/data.

Still thank you for your awesome project 💯 🔥
Let me know if I can help resolving the mentioned issues.

Hi @TheEbolaDoc

thanks for your feedback. Apparently, building Docker images from the latest master branch did not work automatically. As quick-fix I pushed the latest image for `openlegaldata/oldp/ to Docker Hub manually.

Also, the documentation on Docker was outdated. Sorry about that! See https://oldp.readthedocs.io/en/latest/docker.html

Let me know if everything works for you now.

Best,
Malte