Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf583f5ff6 | ||
| d3dbb6e673 | |||
|
|
851b3a6076 | ||
|
|
dbc3103980 | ||
|
|
2dacd4f747 | ||
| 94ede9a168 | |||
|
|
c38574e005 | ||
|
|
700d53fbb0 |
12
README.md
12
README.md
@ -41,8 +41,10 @@ By setting `$BASE_DIR` you can persist the database for later runs.
|
|||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
- CI
|
- [x] CI
|
||||||
- Docker container (in flake)
|
- [x] Docker container (in flake)
|
||||||
- try fourmolu
|
- [x] try fourmolu
|
||||||
- Test leap second handling in the `time` package
|
- [x] Test leap second handling in the `time` package
|
||||||
- use queue to sync logging of indexer and main thread
|
- [ ] Fix container shutdown delay
|
||||||
|
- [ ] Fix `responseFile` always returning 200
|
||||||
|
- [ ] use queue to sync logging of indexer and main thread
|
||||||
|
|||||||
23
flake.nix
23
flake.nix
@ -64,19 +64,30 @@
|
|||||||
name = "git.pbrinkmeier.de/paul/yore";
|
name = "git.pbrinkmeier.de/paul/yore";
|
||||||
tag = yore.version;
|
tag = yore.version;
|
||||||
copyToRoot = [ pkgs.cacert ];
|
copyToRoot = [ pkgs.cacert ];
|
||||||
config.Cmd = [ "${entrypoint}/bin/run" ];
|
config = {
|
||||||
|
Cmd = [ "${entrypoint}/bin/run" ];
|
||||||
|
StopSignal = "SIGINT";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
entrypoint = pkgs.writeShellApplication {
|
entrypoint = pkgs.writeShellApplication {
|
||||||
name = "run";
|
name = "run";
|
||||||
runtimeInputs = [ pkgs.coreutils pkgs.dbmate yore ];
|
runtimeInputs = [ pkgs.coreutils pkgs.dbmate yore ];
|
||||||
text = ''
|
text = ''
|
||||||
mkdir -p /workspace/db
|
set -Eeuo pipefail
|
||||||
cp -r ${./db}/* /workspace/db
|
|
||||||
cd /workspace
|
|
||||||
dbmate up
|
|
||||||
|
|
||||||
yore
|
mkdir -p "''${YORE_DBMATE_DIR}"
|
||||||
|
TMPDIR=$(mktemp -dp "''${YORE_DBMATE_DIR}")
|
||||||
|
mkdir -p "''${TMPDIR}/db"
|
||||||
|
cp -r ${./db}/* "''${TMPDIR}/db"
|
||||||
|
cd "''${TMPDIR}"
|
||||||
|
dbmate up
|
||||||
|
chmod +w -R "''${TMPDIR}"
|
||||||
|
rm -rf "''${TMPDIR}"
|
||||||
|
|
||||||
|
# Replace bash and inherit PID 1
|
||||||
|
cd /
|
||||||
|
exec yore
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|||||||
@ -112,7 +112,7 @@ showpdfRequest (y, m, d) =
|
|||||||
NoReqBody
|
NoReqBody
|
||||||
bsResponse
|
bsResponse
|
||||||
( formToQuery
|
( formToQuery
|
||||||
[ ("cmd" :: Text, "showpdf")
|
[ ("cmd" :: Text, "showpdfjs")
|
||||||
, ("year", y)
|
, ("year", y)
|
||||||
, ("month", m)
|
, ("month", m)
|
||||||
, ("day", d)
|
, ("day", d)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
cabal-version: 3.4
|
cabal-version: 3.4
|
||||||
|
|
||||||
name: yore
|
name: yore
|
||||||
version: 0.0.3
|
version: 0.0.9
|
||||||
author: Paul Brinkmeier
|
author: Paul Brinkmeier
|
||||||
maintainer: hallo@pbrinkmeier.de
|
maintainer: hallo@pbrinkmeier.de
|
||||||
copyright: 2023 Paul Brinkmeier
|
copyright: 2023 Paul Brinkmeier
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user