{ me, pkgs, auxiliaryPkgs, ... }: let inherit (pkgs) php lighttpd freshrss dockerTools; inherit (auxiliaryPkgs) common; freshrssLocalPort = 1819; freshrssDir = "/srv/freshrss"; freshrssImage = dockerTools.streamLayeredImage { name = "freshrss"; tag = freshrss.version; fromImage = common.alpine.base; contents = [ lighttpd freshrss php ]; extraCommands = '' mkdir -p ./opt ./var/log/lighttpd touch ./var/log/lighttpd/access.log ./var/log/lighttpd/error.log ln -s ${freshrss} ./opt/freshrss ''; }; in { # TODO: ..it won't work without cron :3 foundation.services.freshrss = { image = freshrssImage; ports = [ (common.tailnetPort me [ freshrssLocalPort 80 ]) ]; volumes = [ [ "${freshrssDir}/lighttpd.conf" "/etc/lighttpd/freshrss.conf" ] [ "${freshrssDir}/data" "/opt/freshrss/data" ] ]; entrypoint = "${lighttpd}/bin/lighttpd"; cmd = [ "-D" # run in foreground "-f" "/etc/lighttpd/freshrss.conf" ]; }; }