Closed SeraphimSG closed 1 month ago
I can confirm that I am also seeing this issue.
The "fix" for me was to temporarily remove flower and docs from the local.yml file.
@Afrowave this bug report relates to a part you contributed in the documentation (#2664).
I don't really use this extension and therefore I'm not really familiar with how to fix it. Since it's not really part of the template, it's a page which very likely to get outdated, therefore I'm edging on the side of removing it from our documentation. If you want to turn it into a blog post, we could link to it instead.
Let me know what you think.
Would it not be possible to add django-sslserver
as an option? I've never had it fail on me yet ... https://github.com/teddziuba/django-sslserver
However, adding this package would require dropping uvicorn, which wouldn't be compatible with an async server.
Hey @browniebroke,
Let me fix this and give both options.
django and docs are both loading because they both use .envs/.local/.django
, which confuses the nginx environment variable configuration.
What happened?
After implementing the steps described under the "Developing locally with HTTPS" section of the docs, https://my-dev-env.local served pages randomly from both the django and docs containers, resulting in returning successful pages (200) at times and returning 404 page not found errors at other times.
What should've happened instead?
https://my-dev-env.local should only serve pages from the django container.
Additional details
From my observations, this is due to both django and docs containers being included within the "upstream" section of the generated nginx-proxy '/etc/nginx/conf.d/default.conf' file.
This is in turn caused by both django: and docs: within local.yml pointing to the same .env file (/.envs/.local/.django). Hence when VIRTUAL_HOST and VIRTUAL_PORT are added to this .env file (as instructed in the docs), they ended up linking nginx-proxy to both django and docs containers.
As a workaround, I simply created a /.envs/.local/.docs, pointed to this new env file in local.yml (under docs:), rebuilt the containers, and https://my-dev-env.local is serving everything properly now.
I'm wondering if there's a more elegant way around this or is there something I may have missed out in my set up?
cookiecutter --version
): 1.7.2