diff --git a/README.md b/README.md index e161972..f1379c3 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,60 @@ Create account on dev server Reset password for account on dev server - `_build/dev/rel/freedive/bin/freedive eval "Freedive.Release.password_reset"` + + +### Deploy + +Create FreeBSD package: + +- `mix package` + +Copy package to target machine: + +- `scp freedive-0.1.0.pkg hostname:` + +SSH to the tagret machine, +use `doas -S` (or `sudo -s`) if required +to gain admin privileges and then run: + +- `pkg install -U -y freedive-0.1.0.pkg` + +Configure Freedive + +- `$EDITOR /usr/local/etc/freedive/freedive.env` + +Set preferences in freedive.env + +- `HOST="hostname"` +- `BIND="ip-to-bind"` +- `PORT=3443` + +Ensure that the host is set to whatever hostname you'll use +to access the service from browser. +For example, if you bind to the Tailscale/Wireguard IP, +use the hostname that'll point to this IP. +Port can be anything suitable in your environmet +that's open and accessible from your mobile/laptop. + +Enable Freedive + +- `service freedive enable` + +Initialize Freedive + +- `service freedive init` + +Create an account for yourself + +- `service freedive account_create` + +Start Freedive + +- `service freedive start` + +Check logs + +- `tail -f /var/log/freedive/freedive.log` + +Visit https://hostname:port from your browser and +log in with the account created above. \ No newline at end of file