diff --git a/Caddyfile.go.wit.com b/Caddyfile.go.wit.com new file mode 100644 index 0000000..d9a0e16 --- /dev/null +++ b/Caddyfile.go.wit.com @@ -0,0 +1,4 @@ +go.wit.com { + encode zstd gzip + reverse_proxy localhost:3000 +} diff --git a/Makefile b/Makefile index 19486e6..6075cdc 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,8 @@ all: + @echo "make run # will build and run the daemon here" + @echo "make debian # will build a debian package" + +run: git pull echo "build it!" GO111MODULE=off go build -v -x @@ -13,3 +17,6 @@ redomod: GO111MODULE= go mod init GO111MODULE= go mod tidy +# makes a .deb package +debian: + go-deb --no-gui --repo go.wit.com/apps/go.wit.com diff --git a/build b/build new file mode 100755 index 0000000..cbfa3e5 --- /dev/null +++ b/build @@ -0,0 +1,10 @@ +#!/bin/bash -x + +# this is the systemd control file +mkdir -p files/lib/systemd/system/ +cp gowebd.service files/lib/systemd/system/ + +# caddy file. propose this as the dir structure caddy should use +mkdir -p files/etc/gowebd/ +cp Caddyfile.go.wit.com files/etc/gowebd/ +cp resources/repomap files/etc/gowebd/ diff --git a/control b/control new file mode 100644 index 0000000..5b8c9db --- /dev/null +++ b/control @@ -0,0 +1,11 @@ +Source: go.wit.com +Build-Depends: golang +Package: go.wit.com +Maintainer: Jeff Carr +Architecture: amd64 +Depends: caddy +URL: https://go.wit.com/apps/go.wit.com +Description: the go.wit.com website integration with pkg.go.dev + generates a simple website for integration with golang's + packaging system at http://pkg.go.dev/ + TODO: generalize this so other people can use it diff --git a/gowebd.service b/gowebd.service new file mode 100644 index 0000000..fecaeed --- /dev/null +++ b/gowebd.service @@ -0,0 +1,13 @@ +[Unit] +Description=go.wit.com + +[Service] +User=root +Type=simple +ExecStart=/usr/bin/go.wit.com +ExecStop=killall go.wit.com +Restart=on-failure +RestartSec=30 + +[Install] +WantedBy=multi-user.target