summaryrefslogtreecommitdiffstats
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/state/state.go12
-rw-r--r--internal/templates/templates.go6
2 files changed, 13 insertions, 5 deletions
diff --git a/internal/state/state.go b/internal/state/state.go
index c6de34a..38657cb 100644
--- a/internal/state/state.go
+++ b/internal/state/state.go
@@ -22,12 +22,14 @@ type Host struct {
22 22
23// App represents a deployed application or static site 23// App represents a deployed application or static site
24type App struct { 24type App struct {
25 Type string `json:"type"` // "app" or "static" 25 Type string `json:"type"` // "app" or "static"
26 Domain string `json:"domain"` 26 Domain string `json:"domain"`
27 Port int `json:"port,omitempty"` // only for type="app" 27 Port int `json:"port,omitempty"` // only for type="app"
28 Env map[string]string `json:"env,omitempty"` // only for type="app" 28 Env map[string]string `json:"env,omitempty"` // only for type="app"
29 Args string `json:"args,omitempty"` // only for type="app" 29 Args string `json:"args,omitempty"` // only for type="app"
30 Files []string `json:"files,omitempty"` // only for type="app" 30 Files []string `json:"files,omitempty"` // only for type="app"
31 Memory string `json:"memory,omitempty"` // only for type="app"
32 CPU string `json:"cpu,omitempty"` // only for type="app"
31} 33}
32 34
33const ( 35const (
diff --git a/internal/templates/templates.go b/internal/templates/templates.go
index feb6c10..ce1cbe5 100644
--- a/internal/templates/templates.go
+++ b/internal/templates/templates.go
@@ -19,6 +19,12 @@ Restart=always
19RestartSec=5s 19RestartSec=5s
20NoNewPrivileges=true 20NoNewPrivileges=true
21PrivateTmp=true 21PrivateTmp=true
22{{- if .Memory}}
23MemoryMax={{.Memory}}
24{{- end}}
25{{- if .CPU}}
26CPUQuota={{.CPU}}
27{{- end}}
22 28
23[Install] 29[Install]
24WantedBy=multi-user.target 30WantedBy=multi-user.target