Skip to content

Instantly share code, notes, and snippets.

@evdenis
Created July 18, 2016 11:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evdenis/ee6d051e746d663c1f091255fd21f362 to your computer and use it in GitHub Desktop.
Save evdenis/ee6d051e746d663c1f091255fd21f362 to your computer and use it in GitHub Desktop.
Systemd service file for Ghost blogging platform
[Unit]
Description=Ghost blog
After=network.target
[Service]
Type=simple
PIDFile=/run/ghost/pid
WorkingDirectory=/var/www/ghost
RuntimeDirectory=ghost
User=ghost
Group=ghost
ExecStart=/usr/bin/npm start --production /var/www/ghost
ExecStop=/usr/bin/npm stop /var/www/ghost
Restart=always
SyslogIdentifier=ghost
Environment=NODE_ENV=production
StandardOutput=syslog
StandardError=syslog
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment