I tried to create the missing `blast/db` folder in the following way but it still does not work:
``` *$ docker-compose exec web /bin/bash* *# pwd* */code* *# mkdir -p blast/db* *# mkdir -p i5k/blast/db * ``` Where do I have to create *blast/db* folder? Thank you in advance, Michal On Tuesday, May 25, 2021 at 8:25:39 AM UTC+10 Mic wrote: > Hello, > I found a Django project and failed to get it running in Docker container > in the following way: > > 1. `*git clone git clone https://github.com/NAL-i5K/django-blast.git > <https://github.com/NAL-i5K/django-blast.git>*` > 2. `*$ cat requirements.txt*` in this files the below dependencies had > to be updated: > - psycopg2==2.8.6 > > I have the following Dockerfile: > > ``` > *FROM python:2* > *ENV PYTHONUNBUFFERED=1* > *RUN apt-get update && apt-get install -y postgresql-client* > *WORKDIR /code* > *COPY requirements.txt /code/* > *RUN pip install -r requirements.txt* > *COPY . /code/* > *RUN mkdir -p /var/log/django* > *RUN mkdir -p /var/log/i5k* > ``` > > For `docker-compose.yml` I use: > > ``` > *version: "3"* > > *services:* > * db:* > * image: postgres* > * volumes:* > * - ./data/db:/var/lib/postgresql/data* > * - > ./scripts/install-extensions.sql:/docker-entrypoint-initdb.d/install-extensions.sql* > > * environment:* > * - POSTGRES_DB=postgres* > * - POSTGRES_USER=postgres* > * - POSTGRES_PASSWORD=postgres* > > * web:* > * build: .* > * command: python manage.py runserver 0.0.0.0:8000 > <http://0.0.0.0:8000>* > * volumes:* > * - .:/code* > * ports:* > * - "8000:8000"* > * depends_on:* > * - db* > * links:* > * - db* > ``` > > ``` > *$ cat scripts/install-extensions.sql * > *CREATE EXTENSION hstore;* > ``` > > I had to change: > > ``` > * $ vim i5k/settings.py* > * DATABASES = {* > * 'default': {* > * 'ENGINE': 'django.db.backends.postgresql_psycopg2',* > * 'NAME': 'postgres',* > * 'USER': 'postgres',* > * 'PASSWORD': 'postgres',* > * 'HOST': 'db',* > * 'PORT': '5432',* > * }* > * }* > ``` > > Next, I ran: > > 1. `*docker-compose up --build*` > 2. `*docker-compose run web python manage.py`* > 3. `*docker-compose run web python manage.py migrate*` > 4. `*docker-compose run web python manage.py createsuperuser`* > > Finally, I opened in Browser ` > http://localhost:8000/admin/blast/blastdb/add/` > <http://localhost:8000/admin/blast/blastdb/add/> and try to upload a file > and got this error: > > > *```* > > > > > > > > > > > > > > > > *web_1 | [24/May/2021 18:04:53] "POST > /admin/blast/sequencetype/add/?_to_field=id&_popup=1 HTTP/1.1" 200 237web_1 > | [24/May/2021 18:04:58] "GET /admin/blast/blastdb/add/ HTTP/1.1" 200 > 15281web_1 | [24/May/2021 18:04:58] "GET /admin/jsi18n/ HTTP/1.1" 200 > 2372web_1 | django.request ERROR 2021-05-24 18:05:05,381 10 [Internal > Server Error: /admin/filebrowser/browse/]web_1 | Traceback (most recent > call last):web_1 | File > "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line > 132, in get_responseweb_1 | response = wrapped_callback(request, > *callback_args, **callback_kwargs)web_1 | File > "/usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", > line 22, in _wrapped_viewweb_1 | return view_func(request, *args, > **kwargs)web_1 | File > "/usr/local/lib/python2.7/site-packages/django/views/decorators/cache.py", > line 57, in _wrapped_view_funcweb_1 | response = view_func(request, > *args, **kwargs)web_1 | File "/code/filebrowser/views.py", line 89, in > browseweb_1 | raise ImproperlyConfigured, _("Error finding > Upload-Folder. Maybe it does not exist?")web_1 | ImproperlyConfigured: > Error finding Upload-Folder. Maybe it does not exist?web_1 | [24/May/2021 > 18:05:05] "GET > /admin/filebrowser/browse/?pop=1&dir=blast/db/&type=FASTA&filter_type=FASTA > HTTP/1.1" 500 101471* > *```* > Where do I have to create *blast**/db* folder? > > > Thank you in advance > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b3eb5a1a-2295-4449-99b9-d867bafb688fn%40googlegroups.com.