diff --git a/README.md b/README.md index 77151f2..018529d 100644 --- a/README.md +++ b/README.md @@ -2,45 +2,40 @@ SSH honeypot with web-frontend. -## TODO - -* Fix janky ass Makefile - ## Requirements * `go >= 1.16` +* `node >= 22` Requires a postgres database if you want data to persist through server restart. -## Build +## Build using nix -```text -# make frontend -# make build +```console +$ nix build .# + +$ ./result/bin/apiary --version +apiary version v0.2.1-d86bc2be079c6b18a9f941752ebad45d925366d1 (go1.23.6) ``` +## Build without nix + +See [Dockerfile](./Dockerfile) for how to build frontend and backend. Or use Dockerfile +and copy binary from image. + ## Install ```text -# Build and install -INSTALL_PREFIX=/ sudo make install +# Build or download binary +$ cp ./apiary /usr/local/bin/apiary -# Edit config file -vim /etc/apiary/apiary.toml +# Edit config file, should use postgres if you want persistent storage. +# See example config for the different options. +$ vim /etc/apiary/apiary.toml # Run -/usr/bin/apiary serve -# 2021-04-10T11:27:42.783+0200 INFO APP Starting SSH server -# 2021-04-10T11:27:42.783+0200 INFO APP Starting web server +$ /usr/bin/apiary serve +2021-04-10T11:27:42.783+0200 INFO APP Starting SSH server +2021-04-10T11:27:42.783+0200 INFO APP Starting web server ``` -## Development - -Run postgres-tests by running a postgres container: - -```text -podman run -d -q -e POSTGRES_PASSWORD=apiary -e POSTGRES_USER=apiary -e POSTGRES_DB=apiary --rm --name apiary-test-db -p5432:5432 postgres:latest -export APIARY_TEST_POSTGRES_DSN="postgresql://apiary:apiary@localhost/apiary" - -go test ./... -```