0001-use-uwsgi-fixes-13060.patch
debian/compat | ||
---|---|---|
1 |
7 |
|
1 |
8 |
debian/control | ||
---|---|---|
25 | 25 |
python-django-tenant-schemas, |
26 | 26 |
python-psycopg2, |
27 | 27 |
python-django-mellon, |
28 |
gunicorn |
|
28 |
uwsgi, |
|
29 |
uwsgi-plugin-python |
|
29 | 30 |
Recommends: nginx, graphicsmagick |
30 | 31 |
Suggests: postgresql |
31 | 32 |
Description: Fargo Document Box |
debian/fargo.init | ||
---|---|---|
16 | 16 |
PATH=/sbin:/usr/sbin:/bin:/usr/bin |
17 | 17 |
DESC="Document Box" |
18 | 18 |
NAME=fargo |
19 |
DAEMON=/usr/bin/gunicorn
|
|
19 |
DAEMON=/usr/bin/uwsgi
|
|
20 | 20 |
RUN_DIR=/run/$NAME |
21 | 21 |
PIDFILE=$RUN_DIR/$NAME.pid |
22 |
LOG_DIR=/var/log/$NAME |
|
23 | 22 |
SCRIPTNAME=/etc/init.d/$NAME |
24 |
BIND=unix:$RUN_DIR/$NAME.sock |
|
25 |
WORKERS=5 |
|
26 |
TIMEOUT=30 |
|
27 | 23 | |
28 | 24 |
FARGO_SETTINGS_FILE=/usr/lib/$NAME/debian_config.py |
29 | 25 |
MANAGE_SCRIPT="/usr/bin/$NAME-manage" |
... | ... | |
37 | 33 |
# Read configuration variable file if it is present |
38 | 34 |
[ -r /etc/default/$NAME ] && . /etc/default/$NAME |
39 | 35 | |
40 |
DAEMON_ARGS=${DAEMON_ARGS:-"--pid $PIDFILE \ |
|
41 |
--user $USER --group $GROUP \ |
|
42 |
--daemon \ |
|
43 |
--access-logfile $LOG_DIR/gunicorn-access.log \ |
|
44 |
--log-file $LOG_DIR/gunicorn-error.log \ |
|
45 |
--bind=$BIND \ |
|
46 |
--workers=$WORKERS \ |
|
47 |
--worker-class=sync \ |
|
48 |
--timeout=$TIMEOUT \ |
|
49 |
--name $NAME \ |
|
50 |
$NAME.wsgi:application"} |
|
36 |
DAEMON_ARGS=${DAEMON_ARGS:-"--pidfile $PIDFILE \ |
|
37 |
--uid $USER --gid $GROUP \ |
|
38 |
--ini /etc/$NAME/uwsgi.ini \ |
|
39 |
--daemonize /var/log/uwsgi.$NAME.log"} |
|
51 | 40 | |
52 | 41 |
# Load the VERBOSE setting and other rcS variables |
53 | 42 |
. /lib/init/vars.sh |
debian/fargo.install | ||
---|---|---|
2 | 2 |
debian/fargo.service /lib/systemd/system |
3 | 3 |
debian/settings.py /etc/fargo |
4 | 4 |
debian/debian_config.py /usr/lib/fargo/ |
5 |
debian/uwsgi.ini /etc/fargo |
debian/fargo.service | ||
---|---|---|
1 | 1 |
[Unit] |
2 | 2 |
Description=Fargo |
3 |
After=network.target postgresql.service |
|
3 |
After=network.target syslog.target postgresql.service
|
|
4 | 4 |
Wants=postgresql.service |
5 | 5 | |
6 | 6 |
[Service] |
... | ... | |
9 | 9 |
Group=%p |
10 | 10 |
ExecStartPre=/usr/bin/fargo-manage migrate_schemas --noinput |
11 | 11 |
ExecStartPre=/usr/bin/fargo-manage collectstatic --noinput |
12 |
ExecStart=/usr/bin/gunicorn \ |
|
13 |
--bind unix:/run/%p/%p.sock \ |
|
14 |
--worker-class=sync \ |
|
15 |
--workers 5 \ |
|
16 |
--timeout=30 \ |
|
17 |
--name %p \ |
|
18 |
%p.wsgi:application |
|
12 |
ExecStart=/usr/bin/uwsgi --init /etc/%p/uwsgi.ini |
|
19 | 13 |
ExecReload=/bin/kill -HUP $MAINPID |
20 |
TimeoutStartSec=0 |
|
14 |
KillSignal=SIGQUIT |
|
21 | 15 |
PrivateTmp=true |
22 | 16 |
Restart=on-failure |
23 | 17 |
RuntimeDirectory=fargo |
18 |
Type=notify |
|
19 |
StandardError=syslog |
|
20 |
NotifyAccess=all |
|
24 | 21 | |
25 | 22 |
[Install] |
26 | 23 |
WantedBy=multi-user.target |
27 |
- |