Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@erickeller
Created November 22, 2016 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erickeller/7dde9d68f1962b8a95d6e30640f7fec6 to your computer and use it in GitHub Desktop.
Save erickeller/7dde9d68f1962b8a95d6e30640f7fec6 to your computer and use it in GitHub Desktop.
enforce global environment variable via systemd
[Service]
Environment=TS_SOCKET=/tsp/tsp-web.socket
Environment=TMPDIR=/tsp/
UMask=0002
WorkingDirectory=/usr/lib/node_modules/tsp-web
ExecStart=/usr/bin/node /usr/lib/node_modules/tsp-web/index.js
KillSignal=SIGQUIT
KillMode=process
TimeoutStopSec=15s
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=tsp-web
User=tsp
Group=tsp
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment