We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this is single thread and slow
$ python3 app.py
By doing python3 app.py you running api server in single thread with development server, which is highly not recommendation for production
Volbil, [08.02.20 11:03] There is couple ways to do that, I'm personally using gunicorn and systemd
Volbil, [08.02.20 11:33] Well, it's not a python but flask server
Volbil, [08.02.20 11:33] Framework which I'm using
Volbil, [08.02.20 11:39] Also debug server is bad for production
Volbil, [08.02.20 11:39] Since it can expose some debug consoles and etc
Volbil, [08.02.20 11:39] [Forwarded from Fork] pip3 install gunicorn pip3 install eventlet gunicorn app:app --worker-class eventlet -w 1 --bind 0.0.0.0:5000 --reload
Volbil, [08.02.20 11:39] [In reply to Volbil] [Unit] Description=uWSGI instance to serve sugar api After=network.target
[Service] User=ubuntu Group=www-data WorkingDirectory=/home/ubuntu/api Environment="PATH=/home/ubuntu/api/venv/bin" ExecStart=/home/ubuntu/api/venv/bin/gunicorn app:app --worker-class eventlet -w 1 --bind 0.0.0.0:5000 --reload
[Install] WantedBy=multi-user.target
Volbil, [08.02.20 11:39] [In reply to Volbil] Systemd config
https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-18-04
https://blog.fossasia.org/setting-up-nginx-gunicorn-and-flask-socketio/
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04#set-up-nginx-as-a-reverse-proxy-server
The text was updated successfully, but these errors were encountered:
volbil
No branches or pull requests
this is single thread and slow
By doing python3 app.py you running api server in single thread with development server, which is highly not recommendation for production
Volbil, [08.02.20 11:03]
There is couple ways to do that, I'm personally using gunicorn and systemd
Volbil, [08.02.20 11:33]
Well, it's not a python but flask server
Volbil, [08.02.20 11:33]
Framework which I'm using
Volbil, [08.02.20 11:39]
Also debug server is bad for production
Volbil, [08.02.20 11:39]
Since it can expose some debug consoles and etc
Volbil, [08.02.20 11:39]
[Forwarded from Fork]
pip3 install gunicorn
pip3 install eventlet
gunicorn app:app --worker-class eventlet -w 1 --bind 0.0.0.0:5000 --reload
Volbil, [08.02.20 11:39]
[In reply to Volbil]
[Unit]
Description=uWSGI instance to serve sugar api
After=network.target
[Service]
User=ubuntu
Group=www-data
WorkingDirectory=/home/ubuntu/api
Environment="PATH=/home/ubuntu/api/venv/bin"
ExecStart=/home/ubuntu/api/venv/bin/gunicorn app:app --worker-class eventlet -w 1 --bind 0.0.0.0:5000 --reload
[Install]
WantedBy=multi-user.target
Volbil, [08.02.20 11:39]
[In reply to Volbil]
Systemd config
https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-18-04
https://blog.fossasia.org/setting-up-nginx-gunicorn-and-flask-socketio/
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04#set-up-nginx-as-a-reverse-proxy-server
The text was updated successfully, but these errors were encountered: