Some changes for ease of packaging
Closed this issue · 2 comments
I've been trying to package this for NixOS and there are a few problems I've found that make it pretty difficult to package:
ffmpeg gets downloaded at runtime.
Perhaps giving a path for an ffmpeg build would be good. Either in an environment variable or as an argument. Anywhere in the program. Building a custom ffmpeg for this wouldn't be that hard for NixOS. Something like FD_FFMPEG_PATH
or maybe even check if ffmpeg is already in the path. This might simplify your Dockerfile as well. You can just install the ffmpeg given to you by Alpine and not worry about all the downloading stuff.
./db
is a hardcoded path.
Since it requires all the node-packages in the directory it's built in when running it on its own (node float.cjs
), it tries to make ./db in an immutable directory. Once again, probably an environment variable would be good here. Maybe FD_WORK_DIR
or something?
Cannot change path of the settings.json
This is much more a NixOS specific thing. It'd be pretty nice to define the settings.json in a module in NixOS, and it'd be pretty cool to just be able to point the package to some spot like FD_SETTINGS_PATH=${settingsJson}
or something. I wanna setup a systemd unit to run this automatically on a timer too, so it'd be pretty nice to integrate all that nicely.
Of course, I can solve these on my own, this isn't too hard to fix specifically for NixOS with a some bodge patch files, I just figure these changes would make it easier for other distros to package this for themselves :)
I'm actually working on this right now using the arguments.
Since arguments are merged with environment variables, it should work out.
ffmpeg has its own issues that I really would like to just move away from. I've reviewed your pr