Skip to content

Commit

Permalink
Use paswordless auth in dev postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
jhbertra committed Aug 8, 2022
1 parent 81be297 commit 36938bc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
5 changes: 1 addition & 4 deletions marlowe-chain-sync/docker-compose.yaml
Expand Up @@ -6,10 +6,9 @@ services:
environment:
- POSTGRES_LOGGING=true
- POSTGRES_DB_FILE=/run/secrets/postgres_db
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
- POSTGRES_USER_FILE=/run/secrets/postgres_user
- POSTGRES_HOST_AUTH_METHOD=trust # Do not use this in production!
secrets:
- postgres_password
- postgres_user
- postgres_db
ports:
Expand All @@ -31,8 +30,6 @@ services:
secrets:
postgres_db:
file: ./secrets/postgres_db
postgres_password:
file: ./secrets/postgres_password
postgres_user:
file: ./secrets/postgres_user

Expand Down
1 change: 0 additions & 1 deletion marlowe-chain-sync/secrets/postgres_password

This file was deleted.

8 changes: 6 additions & 2 deletions nix/dev/scripts.nix
Expand Up @@ -43,8 +43,12 @@ let
};
};

run-chainseekd = pkgs.writeShellScriptBin "run-chainseekd" ''
cabal run chainseekd --
run-chainseekd = writeShellScriptBinInRepoRoot "run-chainseekd" ''
cd marlowe-chain-sync
cabal run chainseekd -- \
--testnet-magic ${builtins.toString network.magic} \
--socket-path ${devNetworkConfig.node.socket-path} \
--database-uri postgresql://postgres@0.0.0.0/chain \
--genesis-config-file ${network.nodeConfig.ByronGenesisFile} \
--genesis-config-file-hash ${network.nodeConfig.ByronGenesisHash}
'';
Expand Down
3 changes: 2 additions & 1 deletion shell.nix
Expand Up @@ -132,12 +132,13 @@ let
# Point to some source dependencies
+ ''
export ACTUS_TEST_DATA_DIR=${packages.actus-tests}/tests/
export PGUSER=postgres
'';
};
chainSyncShell = haskell.project.shellFor {
buildInputs = [ run-chainseekd ];
nativeBuildInputs = nixpkgsInputs ++ localInputs;
shellHook = '' ${pre-commit-check.shellHook} '';
shellHook = pre-commit-check.shellHook;
withHoogle = false;
};
in
Expand Down

0 comments on commit 36938bc

Please sign in to comment.