Comments (3)
Sorry for the delay @AYEG, I see you solved your problem. Nevertheless, I recently added a feature to allow overriding completely all the Nginx configuration, the new docs are here: https://github.com/tiangolo/uwsgi-nginx-flask-docker#overriding-nginx-configuration-completely
Also, on another note, I created https://github.com/tiangolo/fastapi, inspired by Flask, many of the plug-ins from this project generator and other tools.
If you are using this project generator with all the plug-ins, you would probably enjoy FastAPI a lot.
There is a also a comparable project generator to this one (but with more features): https://github.com/tiangolo/full-stack-fastapi-postgresql
from full-stack.
It turns out I was reading outdated information, the http_v2_module has long been included in the stable release of Nginx. To see which modules can be configured in the current Nginx version:
docker exec -it <backend_container_id> bash
nginx -V
from full-stack.
The easiest and probably best thing to do right now is to first try to add a *.conf file in nginx folder or edit the Nginx config in entrypoint.sh (tiangolo/uwsgi-nginx-docker#36)
integrating the uwsgi-nginx-flask base images (and nginx.conf) into the project can be done as follows:
- include new dockerfiles for uwsgi-nginx and uwsgi-nginx-flask
- include build commands
- include depends_on under backend in d-c.deploy.images.yml and d-c.shared.depends.yml:
- uwsgi-nginx
- uwsgi-nginx-flask
https://github.com/tiangolo/uwsgi-nginx-docker (pick the correct python version)
copy uwsgi.ini nginx.conf and supervisord.conf entrypoint.sh into the project dir into backend folder
copy the uwsgi.ini config file and rename it e.g. uwsgi-base-img-config.ini
https://github.com/tiangolo/uwsgi-nginx-flask-docker (pick the correct python version)
copy the sh scripts
Finally change the FROM lines in uwsgi-nginx-flask.dockerfile and backend.dockerfile. Make sure the copy commands in the uwsgi_nginx.dockerfile and uwsgi_nginx_flask.dockerfile use the renamed uwsgi.ini files.
Now you can edit the files and work with a single supervisord.conf within /app, I noticed that a custom nginx.conf is not used. Changing the lines entrypoint.sh will get copied into the config , or adding a *.conf file in nginx folder.
from full-stack.
Related Issues (16)
- backports.functools_lru_cache HOT 1
- Localhost login error after running Pytest HOT 13
- Cannot create container for service proxy: b'Mount denied:\nThe source path "\\\\var\\\\run\\\\docker.sock:/var/run/docker.sock"\nis not a valid Windows path' HOT 2
- How to setup Flask-Admin HOT 5
- Request: more documentation for configuring/setting up tasks HOT 4
- Flower not showing tasks/workers in development HOT 5
- apispec marshmellow error when attempting to run app via manage.py HOT 2
- Expected username password for pgAdmin4 on startup after first docker-compose up HOT 5
- How to troubleshoot a service when it fails to run [workflow for docker swarm deploy] HOT 3
- FastAPI - Python 3.7 - Nginx - Angular - MariaDB - Docker HOT 6
- How to add Websockets HOT 4
- Traefik on Swarm deploy HOT 4
- backend app won't start HOT 1
- Compose file invalid when running `docker-compose up -d` HOT 2
- Error after running docker-compose up -d HOT 11
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 full-stack.