From ae384f0860c7ef98cc3de1763886566dc6ca903c Mon Sep 17 00:00:00 2001 From: bndw Date: Sun, 28 Dec 2025 09:59:56 -0800 Subject: files --- Makefile | 6 ++++++ internal/state/state.go | 4 +++- internal/templates/templates.go | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ccdc96e --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +build: + go build -o ./bin/deploy ./cmd/deploy + +install: + cp ./bin/deploy /usr/local/bin/ + diff --git a/internal/state/state.go b/internal/state/state.go index c7c7dd4..eb1dee8 100644 --- a/internal/state/state.go +++ b/internal/state/state.go @@ -20,10 +20,12 @@ type Host struct { // App represents a deployed application or static site type App struct { - Type string `json:"type"` // "app" or "static" + Type string `json:"type"` // "app" or "static" Domain string `json:"domain"` Port int `json:"port,omitempty"` // only for type="app" Env map[string]string `json:"env,omitempty"` // only for type="app" + Args string `json:"args,omitempty"` // only for type="app" + Files []string `json:"files,omitempty"` // only for type="app" } const ( diff --git a/internal/templates/templates.go b/internal/templates/templates.go index d90163d..feb6c10 100644 --- a/internal/templates/templates.go +++ b/internal/templates/templates.go @@ -14,7 +14,7 @@ Type=simple User={{.User}} WorkingDirectory={{.WorkDir}} EnvironmentFile={{.EnvFile}} -ExecStart={{.BinaryPath}} --port={{.Port}} +ExecStart={{.BinaryPath}} {{.Args}} Restart=always RestartSec=5s NoNewPrivileges=true -- cgit v1.2.3