diff --git a/Makefile b/Makefile index 1cba48f..bf207e9 100644 --- a/Makefile +++ b/Makefile @@ -147,16 +147,22 @@ system: # Compile setuid binary for production system-dev: # Compile and watch setuid binary for development watchexec -w system/src -n -- ./system/compile.bash +supervisor: # Compile supervisor binary for production + ./supervisor/compile.bash + +supervisor-dev: # Compile and watch supervisor binary for development + watchexec -w supervisor/src -n -- ./supervisor/compile.bash + server: # Run server for production node backend/server.js server-dev: # Run and restart server for development watchexec -w backend -r -n -- node backend/server.js -build: frontend system # Compile all artifacts for production +build: frontend system supervisor # Compile all artifacts for production dev: # Compile, run, and watch all artifacts and server for development - $(MAKE_QUIETLY) -j3 frontend-dev system-dev server-dev + $(MAKE_QUIETLY) -j3 frontend-dev system-dev supervisor-dev server-dev ### Application tools diff --git a/docker/admin/install.bash b/docker/admin/install.bash index 7d784b4..3fbaf07 100755 --- a/docker/admin/install.bash +++ b/docker/admin/install.bash @@ -37,6 +37,7 @@ dctrl-tools docker-ce-cli g++ git +golang htop jq less diff --git a/supervisor/compile.bash b/supervisor/compile.bash new file mode 100755 index 0000000..1152696 --- /dev/null +++ b/supervisor/compile.bash @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -euo pipefail + +cd supervisor +mkdir -p out +go build -o out/riju-supervisor ./src diff --git a/supervisor/go.mod b/supervisor/go.mod new file mode 100644 index 0000000..e766e88 --- /dev/null +++ b/supervisor/go.mod @@ -0,0 +1,3 @@ +module github.com/raxod502/riju/supervisor + +go 1.16 diff --git a/supervisor/src/main.go b/supervisor/src/main.go new file mode 100644 index 0000000..8f61880 --- /dev/null +++ b/supervisor/src/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "fmt" +) + +func main() { + fmt.Println("Hello, world!") +}