[Unit]
Description=graphite-api service
After=network.target
Requires=graphite-api.socket

[Service]
StandardOutput=syslog
StandardError=syslog
User={{ graphite_user }}
Group={{ graphite_group }}
WorkingDirectory={{ graphite_root }}
Environment=GRAPHITE_API_CONFIG={{ graphite_root }}/conf/graphite-api.yml
ExecStart={{ graphite_root }}/bin/gunicorn -w {{ GRAPHITE_GUNICORN_WORKERS }} graphite_api.app:app
Restart=on-failure
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
PrivateTmp=true
LimitNOFILE=128000

[Install]
WantedBy=multi-user.target
