]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/role/templates/caldance/caldance-app.service.erb
Use uwsgi to start caldance application
[perso/Immae/Projets/Puppet.git] / modules / role / templates / caldance / caldance-app.service.erb
diff --git a/modules/role/templates/caldance/caldance-app.service.erb b/modules/role/templates/caldance/caldance-app.service.erb
new file mode 100644 (file)
index 0000000..f5694bf
--- /dev/null
@@ -0,0 +1,20 @@
+[Unit]
+Description=Caldance application
+After=network.target
+
+[Service]
+WorkingDirectory=<%= @caldance_app %>
+
+<% @environment.each do |env, val| %>
+Environment=<%= env %>="<%= val %>"
+<% end %>
+EnvironmentFile=<%= @home %>/caldance_env
+Type=simple
+User=<%= @user %>
+Group=<%= @group %>
+ExecStart=<%= @uwsgi_path %> <%= @caldance_app %>/app.ini
+RuntimeDirectory=caldance
+
+[Install]
+WantedBy=multi-user.target
+