@Larvitz

My deployment workflow for my #Mastodon UI

1 appimagetool packs #Python, #Gunicorn & web_client.py locally into a fresh AppImage 📦
2 The script uploads the AppImage to the #NixOS #server via scp 🚀
3 The #systemd service mastodon-ui is automatically restarted via #ssh 🔄

Отказоустойчивый запуск WSGI приложения. Обзор архитектуры Gunicorn

Gunicorn кажется простым, пока не сталкиваешься с эксплуатацией: внезапные ошибки 502, зависшие воркеры и странное поведение при перезапусках. За этими симптомами стоят вполне конкретные причины — от медленных клиентов и отсутствия буферизации до особенностей реализации GThread и механики Graceful Shutdown. В этой статье разберём реальные сценарии отказов, посмотрим, как менялась архитектура GThread в разных версиях Gunicorn, и соберём практичную конфигурацию с Nginx, Docker и Kubernetes, которая ведёт себя предсказуемо под нагрузкой.

https://habr.com/ru/companies/domclick/articles/882042/

#python #gunicorn #wsgi #prefork #gthread #graceful_shutdown #keepalive #nginx #docker

Отказоустойчивый запуск WSGI приложения. Обзор архитектуры Gunicorn

Gunicorn кажется простым, пока не сталкиваешься с эксплуатацией: внезапные ошибки 502, зависшие воркеры и странное поведение при перезапусках. За этими симптомами стоят вполне конкретные причины — от...

Хабр

DuckDuckFedi how do i get the #gunicorn startup tine in my #django application? I can put `startup = datetime.now()` into my __init__.py, but that only gives me the worker startup time, not the app startup time.

(What i really want is for a view to auto-reload after the template changed in a app update, but ... idk how to do that)

The PR seems to have gone through a first round of reviews, with some useful comments which have now been addressed.

Ready for a second round of reviews and perhaps to be merged, if some good soul is keen to have a look? 🙏 Plsss! 😆

Context: this is to add a #gunicorn service to #Guix.

https://codeberg.org/guix/guix/pulls/6253

gnu: services: Add gunicorn-service-type.

* gnu/services/web.scm (gunicorn-configuration, gunicorn-app): New records. (unix-socket?, unix-socket-path, gunicorn-activation, gunicorn-shepherd-services): New procedures. (gunicorn-service-type): New variable. * doc/guix.texi (Web Services): Document the new service. Co-authored-by: Arun Isa...

Codeberg.org

Migration réussie d’une appli #django de #heroku vers #hetzner 💪

Autant je connais les rouages, autant la stack #nginx #systemd #supervisor #python #gunicorn #postgresql me gonfle un peu 🤭 sans parler qu’il a fallu renouveler les certificats (expirés) via #letsencrypt et configurer une nouvelle entrée au niveau dns.

… en soi, rien n’est réellement compliqué (pour peu que l’on s’y intéresse 🙃)… et en même temps : ça fait beaucoup de choses à comprendre et à configurer pour « juste un CRUD de plus ».

Tout ça manque terriblement de déploiement « push buttons » et de stacks simplifiées.

Je devrais peut-être regarder du côté d’#ansible 🤭

Had a good evening with music and chat via the Doof, pottering around with some CI builds and container hosting, and fixing @bright_helpings 's laptop which had run out of disk space for some reason.

Finally have a live Django app using gunicorn for the app code and a separate lighttpd container for the static assets.

#gunicorn #django #lighttpd #docker #cicd

New pull request to add a #gunicorn service to #Guix.

Guix user? Run some Python web apps via gunicorn? This might be of interest: https://codeberg.org/guix/guix/pulls/6253

(Most of the work by my friend Arun, I've written the docs and created the PR.)

gnu: services: Add gunicorn-service-type.

* gnu/services/web.scm (gunicorn-configuration, gunicorn-app): New records. (unix-socket?, unix-socket-path, gunicorn-activation, gunicorn-shepherd-services): New procedures. (gunicorn-service-type): New variable. * doc/guix.texi (Web Services): Document the new service. Co-authored-by: Arun Isa...

Codeberg.org
"Gunicorn has been serving Python web applications since 2010. It's downloaded millions of times per month and runs in production at companies of all sizes."
And if you're a user, you can and should sponsor the volunteers developing it:
https://gunicorn.org/sponsor/
#OpenSource #Python #Gunicorn
Support Us - Gunicorn

I just updated my python Dash application that is running on Gunicorn in a Docker container after I noticed some errors in the Docker logs. I spent a few hours linting one of the primary files and cleaning up some issues.

It turns out the error I was originally seeing was causing the app to be very slow to load. Now the Dash app loads very quickly in the browser!

#TIL
#Python
#Dash
#Gunicorn
#Docker

How do venvs actually work? The python "binary" inside a venv is just a symlink to the system wide python. The activate script effectively sets VIRTUAL_ENV and prepends PATH. So why can't I have the same effects by just setting those two environment variable manually? Why can't modules of packages installed inside the venv be found by gunicorn when setting both env variables in a systemd unit and starting gunicorn that was installed by apt?
#python #ubuntu #gunicorn