Use atd to stop dockers

This commit is contained in:
Charlotte Van Petegem 2020-05-08 10:54:59 +02:00
parent 78fd31e2aa
commit fa649fe5bc
3 changed files with 11 additions and 8 deletions

View file

@ -52,4 +52,4 @@ windows:
- bundle exec rails jobs:work
- ./bin/webpack-dev-server
- logs: tail -f log/development.log
- db: start-db
- db: start-dockers

View file

@ -51,10 +51,13 @@
];
};
services.locate = {
enable = true;
interval = "hourly";
localuser = "charlotte";
services = {
atd.enable = true;
locate = {
enable = true;
interval = "hourly";
localuser = "charlotte";
};
};
system.autoUpgrade = {

View file

@ -10,12 +10,12 @@ pkgs.mkShell {
yarn
zlib
(
pkgs.writeScriptBin "start-db" ''
pkgs.writeScriptBin "start-dockers" ''
#!${bash}/bin/bash
function stopdockers {
docker stop dodona-db
docker stop dodona-cache
echo ${docker}/bin/docker stop dodona-db | ${at}/bin/at NOW
echo ${docker}/bin/docker stop dodona-cache | ${at}/bin/at NOW
}
trap stopdockers 0