Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a graceful container shutdown #1946

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Revision history for cardano-db-sync

- Fixes an issue where stopping the docker container results in non graceful shutdown

## 13.6.0.4
- Fixes an issue from ledger where DRep delegations could be removed under some conditions
- Fix an issue with migration from 13.5.x when consumed_tx_out config is enabled
Expand Down
7 changes: 5 additions & 2 deletions nix/docker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ let

baseImage = dockerTools.buildImage {
name = "cardano-db-sync-base-env";
config.Env = [ "NIX_SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt" ];
config = {
Env = [ "NIX_SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt" ];
StopSignal = "SIGINT";
};

copyToRoot = buildEnv {
name = "base-image-env";
Expand Down Expand Up @@ -93,7 +96,7 @@ let
db-sync = pkgs.writeScriptBin "cardano-db-sync-${service.cluster}" ''
#!${runtimeShell}
set -euo pipefail
${service.script} $@
exec ${service.script} $@
'' // {
passthru = { inherit service; };
};
Expand Down
Loading