forked from PnX-SI/TaxHub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
taxhub.service
28 lines (26 loc) · 843 Bytes
/
taxhub.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[Unit]
Description=TaxHub
After=network.target
After=postgresql.service
[Service]
Type=simple
User=${USER}
Group=${USER}
WorkingDirectory=${TAXHUB_DIR}/
Environment=GUNICORN_PROC_NAME=taxhub
Environment=GUNICORN_NUM_WORKERS=4
Environment=GUNICORN_HOST=127.0.0.1
Environment=GUNICORN_PORT=5000
Environment=GUNICORN_TIMEOUT=30
Environment=GUNICORN_LOG_FILE=/var/log/taxhub/%N%I.log
EnvironmentFile=-${TAXHUB_DIR}/environ
ExecStart=${TAXHUB_DIR}/venv/bin/gunicorn apptax.app:create_app() \
--name "${GUNICORN_PROC_NAME}" --workers "${GUNICORN_NUM_WORKERS}" \
--bind "${GUNICORN_HOST}:${GUNICORN_PORT}" --timeout="${GUNICORN_TIMEOUT}" \
--log-file "${GUNICORN_LOG_FILE}"
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutStartSec=10
TimeoutStopSec=5
PrivateTmp=true
[Install]
WantedBy=multi-user.target