]> git.openstreetmap.org Git - chef.git/blob - cookbooks/systemd/templates/default/container.erb
mediawiki: Remove unsupported DynamicPageListEngine
[chef.git] / cookbooks / systemd / templates / default / container.erb
1 [Unit]
2 <% if @description -%>
3 Description=<%= @description %>
4 <% end -%>
5
6 [Container]
7 <% if @image -%>
8 Image=<%= @image %>
9 <% end -%>
10 <% if @command -%>
11 Exec=<%= @command %>
12 <% end -%>
13 <% @ports.each do |host, guest| -%>
14 PublishPort=127.0.0.1:<%= host %>:<%= guest %>
15 <% end -%>
16 <% @environment.each do |name, value| -%>
17 Environment=<%= name %>=<%= value %>
18 <% end -%>
19 <% @volumes.each do |source, path| -%>
20 Volume=<%= source %>:<%= path %>
21 <% end -%>
22 <% if @pids_limit -%>
23 PidsLimit=<%= @pids_limit %>
24 <% end -%>
25 UserNS=auto
26 AutoUpdate=registry
27
28 [Service]
29 <% if @restart -%>
30 Restart=<%= @restart %>
31 <% end -%>
32 <% if @timeout_start_sec -%>
33 TimeoutStartSec=<%= @timeout_start_sec %>
34 <% end -%>
35
36 [Install]
37 WantedBy=default.target