forked from PnX-SI/GeoNature-atlas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
geonature-atlas.service
27 lines (25 loc) · 811 Bytes
/
geonature-atlas.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
[Unit]
Description=GeoNature Atlas
After=network.target
[Service]
Type=simple
User=${USER}
Group=${USER}
WorkingDirectory=${BASE_DIR}/
Environment=GUNICORN_PROC_NAME=geonature-atlas
Environment=GUNICORN_NUM_WORKERS=${gun_num_workers}
Environment=GUNICORN_HOST=127.0.0.1
Environment=GUNICORN_PORT=${gun_port}
Environment=GUNICORN_TIMEOUT=30
EnvironmentFile=-${BASE_DIR}/environ
ExecStart=${BASE_DIR}/venv/bin/gunicorn atlas.wsgi:app \
--name "${GUNICORN_PROC_NAME}" --workers "${GUNICORN_NUM_WORKERS}" \
--bind "${GUNICORN_HOST}:${GUNICORN_PORT}" --timeout="${GUNICORN_TIMEOUT}"
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutStartSec=10
TimeoutStopSec=5
PrivateTmp=true
StandardOutput=append:/var/log/geonature-atlas.log
StandardError=inherit
[Install]
WantedBy=multi-user.target