4r/4r-feed
staticvoid 23b4365129 4r-feed: add nix flags to README 2022-07-12 18:39:47 +03:00
..
Api/V1 4r-feed: Use V1 api 2022-07-12 15:39:57 +03:00
Feed/V1 4r-feed: add 4RUM_BASE_URL env var 2022-07-12 18:29:48 +03:00
Servant/API/ContentTypes 4r-feed: Use V1 api 2022-07-12 15:39:57 +03:00
4r-feed.cabal 4r-feed: Use V1 api 2022-07-12 15:39:57 +03:00
Main.hs 4r-feed: Use V1 api 2022-07-12 15:39:57 +03:00
README.md 4r-feed: add nix flags to README 2022-07-12 18:39:47 +03:00
Utils.hs 4r-feed: Use V1 api 2022-07-12 15:39:57 +03:00

README.md

Usage

> 4r-feed -- --help
Help Options:
  -h, --help
    Show option summary.
  --help-all
    Show all help options.

Application Options:
  --port :: int
    The port the app should listen for connections on (for http)
    default: 3000
  --host :: text
    Host preference (for http)
    default: "*4"
  --socket :: text
    The UNIX domain socket path the app should listen for connections on (for
    unix)
    default: "wai.sock"
  --protocol :: text
    The protocol for the server. One of: http, cgi, unix, activate, http+tls,
    unix+tls, activate+tls
    default: "http"
  --tlskey :: text
    Path to the TLS private key file for +tls protocols
    default: ""
  --tlscert :: text
    Path to the TLS certificate bundle file for +tls protocols
    default: ""
  --graceful :: text
    Graceful shutdown mode. One of: none, serve-normally, serve-503
    default: "serve-normally"
  --devlogging :: maybe<bool>
    Whether development logging should be enabled

Env variables:

  • 4R_FEED_CACHE is number of seconds of cache validity. Default = 3600
  • 4RUM_BASE_URL is base URL for performing requests to 4RUM API. Default = http://4rum.i2p:80/
  • I2P_HTTP_PROXY is address of I2P router. Will be used if 4RUM_BASE_URL's host ends with .i2p. Default = 127.0.0.1:4444

Create a docker image

> nix --extra-experimental-features nix-command --extra-experimental-features flakes bundle --bundler github:NixOS/bundlers#toDockerImage .#packages.x86_64-linux._4r-feed
> ls
4r  4r-api  4r-feed  4r-feed-0.1.0.tar.gz  README.md  flake.lock  flake.nix  nix

4r-feed-$VERSION.tar.gz is a symbolic link to Docker image of 4r-feed.