• Home
  • Jobs
  • Courses
  • Teachers
  • For business
  • Blog
  • ES/EN

0

26
Views
Gunicorn cannot find modules

I am trying to run a django-docker image via gunicorn. However, gunicorn does not find my modules.

I tried to use gunicorn in a venv. (adding CMD exec source venv/bin/activate in the Dockerfile.) This is also not working. What am i doing wrong?

Dockerfile

FROM python:3.6.7
MAINTAINER Jasper
ADD . /usr/src/app
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 8000
CMD exec gunicorn bomt_project.wsgi:application --preload --bind 
0.0.0.0:8000 --workers 3

I expect the server to be running on port 8000. The output however is ModuleNotFoundError: No module named 'widget_tweaks'

about 1 month ago ·

Santiago Trujillo

Answer question
Find remote jobs
Loading

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2022 PeakU Inc. All Rights Reserved.