Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: Enrico Tröger enrico.troeger@uvena.de Date: Wed, 01 May 2019 12:33:25 UTC Commit: 86750939f4884c5802879f1c29b9f0f49004cf88 https://github.com/geany/www.geany.org/commit/86750939f4884c5802879f1c29b9f0...
Log Message: ----------- Replace Gunicorn by UWSGI for deployment
Also add a Systemd unit file and the UWSGI config.
Modified Paths: -------------- geany.org.service geany/settings.py gunicorn.conf.py requirements.txt uwsgi.ini
Modified: geany.org.service 36 lines changed, 36 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# LICENCE: This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. + +[Unit] +Description=geany.org website +After=network.target + +[Service] +Type=notify +RuntimeDirectory=uwsgi +ExecStart=/srv/django/www.geany.org/venv/bin/uwsgi \ + --ini /srv/django/www.geany.org/uwsgi.ini +Restart=on-failure +RestartSec=2 +KillSignal=SIGQUIT +NotifyAccess=all +SyslogIdentifier=uwsgi +PrivateDevices=yes +PrivateTmp=yes +ProtectSystem=full +ProtectHome=yes +NoNewPrivileges=yes + +[Install] +WantedBy=multi-user.target
Modified: geany/settings.py 1 lines changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -322,7 +322,6 @@
# 3rd party "honeypot", # for pastebin - "gunicorn", "mezzanine_pagedown", )
Modified: gunicorn.conf.py 6 lines changed, 0 insertions(+), 6 deletions(-) =================================================================== @@ -1,6 +0,0 @@ - -bind = "127.0.0.1:40000" -workers = 6 -max_requests = 2500 -loglevel = "info" -proc_name = "geany"
Modified: requirements.txt 3 lines changed, 1 insertions(+), 2 deletions(-) =================================================================== @@ -5,14 +5,13 @@ django-compressor django-extensions django-honeypot django-memcache-status -gunicorn mezzanine-pagedown pygments pylibmc python-logstash-async pymdown-extensions pytz -setproctitle +uwsgi
# for development
Modified: uwsgi.ini 42 lines changed, 42 insertions(+), 0 deletions(-) =================================================================== @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# LICENCE: This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. + +[uwsgi] +project = www.geany.org + +chdir = /srv/django/%(project) +uid = django +gid = django +umask = 022 +harakiri = 900 +post-buffering = true +master = true +# socket +socket = /run/uwsgi/%(project).sock +chmod-socket = 660 +chown-socket = django:www-data +# paths +master-fifo = /srv/django/run/%(project).fifo +pidfile = /srv/django/run/%(project).pid +thunder-lock = true +# logging +log-format = [pid: %(pid)] [wid: %(wid)] [%(addr)] (%(user)) %(method) %(uri) => generated %(rsize) bytes in %(msecs) msecs (%(proto) %(status)) [RqID: %(var.HTTP_REQUEST_ID)] +threaded-logger = true +# processes/threads +processes = 4 +threads = 4 +max-requests = 2500 +# the app +module = geany.wsgi:application +lazy-apps = false
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).