[Unit] Description=SpotMe on {{ domain }} After=syslog.target After=network.target Requires=mariadb.service [Service] Type=simple User={{ spotme_system_user }} Group={{ spotme_system_user }} WorkingDirectory={{ spotme_installation_directory }} ExecStart=/usr/bin/npm start Environment="USER={{ spotme_system_user }}" Environment="HOME={{ spotme_user_directory }}" Environment="NODE_ENV=production" Environment="PORT={{ spotme_port }}" Environment="DATABASE_HOST=127.0.0.1" Environment="DATABASE_PORT=3306" Environment="DATABASE_USERNAME={{ database_user }}" Environment="DATABASE_PASSWORD={{ database_pass }}" Environment="DATABASE_NAME={{ database_name }}" Restart=always RestartSec=2s StartLimitInterval=60s StartLimitBurst=5 [Install] WantedBy=multi-user.target