[Unit]
Description=Start nodejs app
<% unless @without_redis %>
Requires=redis-server.service
After=redis-server.service
<% end %>

[Service]
ExecStart=<%= @entry %>
WorkingDirectory=<%= @app_dir %>
User=<%= @user %>
Group=<%= @group %>
<% unless @environment.empty? -%>
Environment=<% @environment.each do |key, value| -%>'<%= key %>=<%= value %>' <% end %>
<% end -%>
Restart=always

[Install]
WantedBy=multi-user.target
