Comments (8)
Found it! In the Nginx section of your tutorial: https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/#nginx
...there is a test link near the end of the section. This test link is to prove app operation through the nginx routing. At the point at which this link is presented, /admin is still the only valid url.
Here is the link as presented in the tutorial section...
http://localhost:1337/
If I were more experienced I would have likely caught it without even thinking about it. More over, I might have just not clicked the link, finished the tutorial without checking, and by the time I got to it, the link would have been good. As it is, it was just enough to send me flailing.
from django-on-docker.
Often, when you get a page not found like that, the underlying issue is with the application that you're trying to serve up not Nginx. I would focus time on figuring out if there is something wrong with the Django application, in other words. Have you looked at the Docker logs? If you expose the Django application itself via ports--
ports:
- 8000:8000
--can you view the app from port 8000?
from django-on-docker.
from django-on-docker.
I'm not sure. I just tested it out and it works on my machine. (I'm on a mac).
test.mp4
Test it out in the same way. If it works, then you may have missed something in the tutorial. If it doesn't, then it may be an environment specific issue. What kind of machine are you on? I've updated this tutorial 3 or 4 times in the past few years, so it's been tested a number of times.
from django-on-docker.
from django-on-docker.
Yes
from django-on-docker.
OK, trying this out again. The issue is not exactly as I reported before. Nginx does appear to be running. Its just giving me 404s. For some reason its not getting through to the app. Likewise, I cannot bring up the app by accessing port 8000. Not sure if this is for the same reason or if because port 8000 on the web app is not built with the expose flag instead of the ports flag and now is only supposed to be visible from other Dockers. Either way, the Nginx instance does not appear to be routing to it.
My only apparent variance from the source code in this project is that I have not yet added static files. It is otherwise the same as best as I can tell. Don't know why Nginx does not want to route to the app.
from django-on-docker.
I'm sorry. For some reason, my iPad was not showing me your test.mp4 video, so I did not see the instructions you left. I reproduced your test case from git download and it works fine. I don't know what I missed or skipped in the following the tutorial. Doing a file by file diff to try to track it down.
Will follow up...
from django-on-docker.
Related Issues (20)
- Why collectstatic on dev? HOT 1
- Where is certbot and Lets Encrypt? HOT 1
- How to integrate https letsencript HOT 1
- Flake 8 in app/Dockerfile.prod HOT 1
- Entrypoint files break build (container start) when they have Win CR/LF EOLs
- nginx - docker - problem with adding add worker_connections. nginx - directive is not allowed here HOT 1
- Intermittent 502 Errors When Customizing Dockerized Django / Gunicorn / Docker / Postgres HOT 6
- Conflict between dev and prod HOT 1
- Getting stuck on "Media files"
- Not serving static files
- unable to create migration file HOT 2
- Dockerfile missing netcat dependency (apologies if wrong repo for django-tdd-docker) HOT 1
- Please mention the database flush in the Readme HOT 1
- Volumes attached, but no tables in hello_django_dev DB HOT 1
- Copy overrides entrypoint.sh HOT 6
- Debug Flag as bool HOT 1
- Entrypoint script not found HOT 1
- Not suitable for production without supervisor process?
- Making media files accessible from host HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-on-docker.