Add DATABASE_CONNECTION option
This commit is contained in:
parent
580f80b521
commit
a85f6878ae
2 changed files with 21 additions and 36 deletions
38
README.md
38
README.md
|
|
@ -5,6 +5,16 @@
|
|||
|
||||
## Usage
|
||||
|
||||
### Using nix
|
||||
|
||||
```nix
|
||||
nix develop # to get the dev dependencies
|
||||
nix build
|
||||
nix run -- /tmp/rss/
|
||||
```
|
||||
|
||||
### Using podman
|
||||
|
||||
Use the `justfile` to run commands:
|
||||
|
||||
```bash
|
||||
|
|
@ -12,35 +22,7 @@ just init # Will init the database, and build the app image
|
|||
just run # Will run the lwn-sub-snoozer to update the database and the RSS file
|
||||
```
|
||||
|
||||
## Nix setup
|
||||
|
||||
For my server, I have the following setup:
|
||||
|
||||
```nix
|
||||
systemd.timers."rssify-update" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "5m";
|
||||
OnUnitActiveSec = "12h";
|
||||
Unit = "rssify-update.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."rssify-update" = {
|
||||
script = ''
|
||||
${pkgs.rssify}/bin/echo "Hello World"
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
## TODO
|
||||
|
||||
- [ ] Nix service with timer
|
||||
- [ ] Better path managment, with env variable in Dockerfile
|
||||
- [ ] Clean repo
|
||||
- [ ] Add volume to the db to store it if it crashes
|
||||
- [ ] Add tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue