Update README

This commit is contained in:
Torjus Håkestad 2025-03-19 22:35:33 +01:00
parent 73dce3d1f3
commit b2e3632b56
Signed by: torjus
SSH Key Fingerprint: SHA256:KjAds8wHfD2mBYK2H815s/+ABcSdcIHUndwHEdSxml4

View File

@ -2,45 +2,40 @@
SSH honeypot with web-frontend. SSH honeypot with web-frontend.
## TODO
* Fix janky ass Makefile
## Requirements ## Requirements
* `go >= 1.16` * `go >= 1.16`
* `node >= 22`
Requires a postgres database if you want data to persist through server restart. Requires a postgres database if you want data to persist through server restart.
## Build ## Build using nix
```text ```console
# make frontend $ nix build .#
# make 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 ## Install
```text ```text
# Build and install # Build or download binary
INSTALL_PREFIX=/ sudo make install $ cp ./apiary /usr/local/bin/apiary
# Edit config file # Edit config file, should use postgres if you want persistent storage.
vim /etc/apiary/apiary.toml # See example config for the different options.
$ vim /etc/apiary/apiary.toml
# Run # Run
/usr/bin/apiary serve $ /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 SSH server
# 2021-04-10T11:27:42.783+0200 INFO APP Starting web 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 ./...
```