question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker compose module not found (docker and docker.wsgi)

See original GitHub issue

Describe the bug Getting a ModuleNotFoundError: docker error when trying to run docker-compose up -d on the backend.

I tried adding pip install docker to the Dockerfile but then I just get:

ModuleNotFoundError: No module named 'docker.wsgi'

To Reproduce Steps to reproduce the behavior:

  1. Install following README instructions
  2. Run docker-compose up -d
  3. Look at the logs of backend application

Expected behavior Should run on localhost:8000 like it does when running outside of docker

Desktop (please complete the following information):

  • OS: [e.g. iOS] Mac OS X
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
Buuntucommented, Jan 25, 2020

The fix was to change the gunicorn line in backend/Dockerfile from:

CMD gunicorn docker.wsgi --log-file - -b 0.0.0.0:8000 --reload

to:

CMD gunicorn application_name.wsgi --log-file - -b 0.0.0.0:8000 --reload

Should this be in the README though?

1reaction
jhgvcommented, Feb 6, 2020

PR #441 have been opened to fix it. Thanks for reporting!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flask unable to start server using Docker due ...
So means that my Flask service is failed to build,therefore the application server Nginx is proxying to is not running,according to this answer....
Read more >
docker-compose up gives this error ...
What I'm trying to achieve. As per instructions I'm installing saleor using docker-compose on windows.
Read more >
tiangolo/uwsgi-nginx-flask - Docker Image
Docker image with uWSGI and Nginx for Flask web applications in Python ... You could be deploying to a single server (not a...
Read more >
Dockerizing a Python Django Web Application
Get an understanding of how to dockerize your Django application, using the Gunicorn web server, capable of serving thousands of requests in ...
Read more >
What is Docker and How to Use it With Python
There is no need to install 3rd-party apps like PostgreSQL, Redis, Elasticsearch on the system – you can run it in containers. Docker...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found