Skip to content

Commit

Permalink
temporarily print the config as it is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
ryardley committed Dec 11, 2024
1 parent abdc9b9 commit a199f7f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .deploy/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

docker build -t ghcr.io/gnosisguild/ciphernode:mytest -f ./packages/ciphernode/Dockerfile .
4 changes: 2 additions & 2 deletions .deploy/cn1.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
address: "${CN1_ADDRESS}"
quic_port: ${CN1_QUIC_PORT}
address: "${ADDRESS}"
quic_port: ${QUIC_PORT}
enable_mdns: false
chains:
- name: "sepolia"
Expand Down
2 changes: 1 addition & 1 deletion .deploy/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ if [ ! -f "./.deploy/.env" ]; then
exit 1
fi

docker stack deploy --env-file ./.deploy/.env -c .deploy/docker-compose.yml enclave-stack --detach=false
docker stack deploy -c .deploy/docker-compose.yml enclave-stack --detach=false
19 changes: 8 additions & 11 deletions .deploy/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
cn1:
image: ghcr.io/gnosisguild/ciphernode:${TAG:-latest}
image: ghcr.io/gnosisguild/ciphernode:20241210-44aac5b0
volumes:
- ./cn1.yaml:/home/ciphernode/.config/enclave/config.yaml:ro
- cn1-data:/home/ciphernode/.local/share/enclave
Expand All @@ -11,7 +11,7 @@ services:
environment:
RUST_LOG: "info"
AGGREGATOR: "false"
ADDRESS: ${CN1_ADDRESS}
ADDRESS: "0xbDA5747bFD65F08deb54cb465eB87D40e51B197E"
QUIC_PORT: 9091
ports:
- "9091:9091"
Expand All @@ -26,9 +26,8 @@ services:
networks:
- global-network


cn2:
image: ghcr.io/gnosisguild/ciphernode:${TAG:-latest}
image: ghcr.io/gnosisguild/ciphernode:20241210-44aac5b0
depends_on:
- cn1
volumes:
Expand All @@ -41,11 +40,10 @@ services:
environment:
RUST_LOG: "info"
AGGREGATOR: "false"
ADDRESS: ${CN2_ADDRESS}
ADDRESS: "0xdD2FD4581271e230360230F9337D5c0430Bf44C0"
QUIC_PORT: 9092
ports:
- "9092:9092"

deploy:
replicas: 1
update_config:
Expand All @@ -58,7 +56,7 @@ services:
- global-network

cn3:
image: ghcr.io/gnosisguild/ciphernode:${TAG:-latest}
image: ghcr.io/gnosisguild/ciphernode:20241210-44aac5b0
depends_on:
- cn1
volumes:
Expand All @@ -71,7 +69,7 @@ services:
environment:
RUST_LOG: "info"
AGGREGATOR: "false"
ADDRESS: ${CN3_ADDRESS}
ADDRESS: "0x2546BcD3c84621e976D8185a91A922aE77ECEc30"
QUIC_PORT: 9093
ports:
- "9093:9093"
Expand All @@ -86,9 +84,8 @@ services:
networks:
- global-network


aggregator:
image: ghcr.io/gnosisguild/ciphernode:${TAG:-latest}
image: ghcr.io/gnosisguild/ciphernode:20241210-44aac5b0
depends_on:
- cn1
volumes:
Expand All @@ -101,7 +98,7 @@ services:
environment:
RUST_LOG: "info"
AGGREGATOR: "true"
ADDRESS: ${AGG_ADDRESS}
ADDRESS: "0x8626a6940E2eb28930eFb4CeF49B2d1F2C9C1199"
QUIC_PORT: 9094
ports:
- "9094:9094"
Expand Down
1 change: 1 addition & 0 deletions packages/ciphernode/config/src/app_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ pub fn load_config(config_file: Option<&str>) -> Result<AppConfig> {
}

let with_envs = load_yaml_with_env(&defaults.config_file())?;
println!("{}", with_envs);

let config = Figment::from(Serialized::defaults(&defaults))
.merge(Yaml::string(&with_envs))
Expand Down

0 comments on commit a199f7f

Please sign in to comment.