oh, yes, and there is a "env" option which outputs to stdout the configuration it is currently using, which can be the one that is already in the ~/.config/realy/.env file
just add `help` to the commandline it prints out the information about the environment variables and describes what they do, and their defaults (or -h or --h or --help or even just `?`)
https://github.com/mleku/realy/blob/dev/cmd/realy/app/config.go
this is what the output from using the CLI help option (this is teh only CLI args that it understands, i made it as dumb as possible:
Environment variables that configure realy:
APP_NAME string default realy
PROFILE string default /mnt/old/home/mleku/.config/realy root path for all other path configurations (based on APP_NAME and OS specific location)
LISTEN string default 0.0.0.0 network listen address
PORT int default 3334 port to listen on
ADMIN_LISTEN string default 127.0.0.1 admin listen address
ADMIN_PORT int default 3337 admin listen port
LOG_LEVEL string default info debug level: fatal error warn info debug trace
DB_LOG_LEVEL string default info debug level: fatal error warn info debug trace
AUTH_REQUIRED bool default false requires auth for all access
OWNERS []string default [] list of npubs of users in hex format whose follow and mute list dictate accepting requests and events - follows and follows follows are allowed, mutes and follows mutes are rejected
DB_SIZE_LIMIT int default 0 the number of gigabytes (1,000,000,000 bytes) we want to keep the data store from exceeding, 0 means disabled
DB_LOW_WATER int default 60 the percentage of DBSizeLimit a GC run will reduce the used storage down to
DB_HIGH_WATER int default 80 the trigger point at which a GC run should start if exceeded
GC_FREQUENCY int default 3600 the frequency of checks of the current utilisation in minutes
PPROF bool default false enable pprof on 127.0.0.1:6060
MEMLIMIT int default 250000000 set memory limit, default is 250Mb
NWC string default
CLI parameter 'help' also prints this information
.env file found at the ROOT_DIR/PROFILE path will be automatically loaded for configuration.
set these two variables for a custom load path, this file will be created on first startup.
environment overrides it and you can also edit the file to set configuration options
use the parameter 'env' to print out the current configuration to the terminal
set the environment using
/tmp/go-build1784177396/b001/exe/realy env>/home/mleku/.config/realy//home/mleku/.config/realy/.env
Discussion
also, no, NWC is not implemented yet, that's a WIP and not present on the current latest tag and commit on the "dev" branch
also, yes, the DB_SIZE_LIMIT feature works, i've tested it pretty extensively with a layer2 second level store i made that is just the same as the first level without any pruning... well, it seems to work pretty good, anyway, definitely is pruning out the events... it keeps the index though, i think...
i need to finish working on that with the first and original layer2 event store implementation that uses ICP shitcoin chain as a data storage... it's not finished without one proper second layer, i do also want to add blossom as a second layer option, in theory it would be possible to set it up so it primarily stores indexes and has a tiny low/high water setting and always goes to the L2 for events and keeps them in the DB only for as long as it takes for the users to move on to other data, a day or two worth in cache, everything else on a blossom