Running at https://mealplan.pikans.org/
data.go
: loads and saves all the state from/to diskserver/signup.go
: has all the logic for displaying the pages & handling user inputserver/signup.html
: a Go HTML template which is used to display the main page (for both authorized and unauthorized users)
Before you deploy, you'll need to clone pika's cdist repo: https://wiki.pikans.org/yfncc/git#yfncc-cdist.
You'll also need SSH keys for root on pika-web.mit.edu
-- ask yfncc.
- Make sure you're in the
server
directory - Build for OpenBSD:
env GOOS=openbsd GOARCH=amd64 go build
- Copy the resulting
server
binary to the cdist repo, atcdist/conf/manifest/bin/openbsd/mealplan
, and copyserver.html
andadmin.html
(if changed) intocdist/conf/manifest/html/
- Navigate up to
yfncc-cdist/
in the cdist repo and run./bin/cdist config -v pika-web.mit.edu
- (If the binary changed) SSH into
pika-web.mit.edu
and restart the server: su mealplan
to change into usermealplan
tmux attach
to attach to an existingtmux
session, or justtmux
to start a new one- Kill the existing
mealplanserver
process, either with Ctrl+C if it's in the console, or finding the process and stopping it. - Start it anew, with
./run.sh
or./run-console.sh
, depending on whether you want to get live console output in thetmux
session (only do this if you're running intmux
, or else it will die once your SSH connection dies!)