Compare commits

..

No commits in common. "main" and "v0.0.3" have entirely different histories.
main ... v0.0.3

4 changed files with 12 additions and 25 deletions

View File

@ -41,10 +41,8 @@ By setting `$BASE_DIR` you can persist the database for later runs.
## TODO ## TODO
- [x] CI - CI
- [x] Docker container (in flake) - Docker container (in flake)
- [x] try fourmolu - try fourmolu
- [x] Test leap second handling in the `time` package - Test leap second handling in the `time` package
- [ ] Fix container shutdown delay - use queue to sync logging of indexer and main thread
- [ ] Fix `responseFile` always returning 200
- [ ] use queue to sync logging of indexer and main thread

View File

@ -64,30 +64,19 @@
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 = { config.Cmd = [ "${entrypoint}/bin/run" ];
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 = ''
set -Eeuo pipefail mkdir -p /workspace/db
cp -r ${./db}/* /workspace/db
mkdir -p "''${YORE_DBMATE_DIR}" cd /workspace
TMPDIR=$(mktemp -dp "''${YORE_DBMATE_DIR}")
mkdir -p "''${TMPDIR}/db"
cp -r ${./db}/* "''${TMPDIR}/db"
cd "''${TMPDIR}"
dbmate up dbmate up
chmod +w -R "''${TMPDIR}"
rm -rf "''${TMPDIR}"
# Replace bash and inherit PID 1 yore
cd /
exec yore
''; '';
}; };
in { in {

View File

@ -112,7 +112,7 @@ showpdfRequest (y, m, d) =
NoReqBody NoReqBody
bsResponse bsResponse
( formToQuery ( formToQuery
[ ("cmd" :: Text, "showpdfjs") [ ("cmd" :: Text, "showpdf")
, ("year", y) , ("year", y)
, ("month", m) , ("month", m)
, ("day", d) , ("day", d)

View File

@ -1,7 +1,7 @@
cabal-version: 3.4 cabal-version: 3.4
name: yore name: yore
version: 0.0.9 version: 0.0.3
author: Paul Brinkmeier author: Paul Brinkmeier
maintainer: hallo@pbrinkmeier.de maintainer: hallo@pbrinkmeier.de
copyright: 2023 Paul Brinkmeier copyright: 2023 Paul Brinkmeier