diff --git a/build/compose-devnet.yaml b/build/compose-devnet.yaml index 2be3edc12..a4887869b 100644 --- a/build/compose-devnet.yaml +++ b/build/compose-devnet.yaml @@ -34,4 +34,4 @@ services: CARTESI_FEATURE_MACHINE_HASH_CHECK_ENABLED: "false" CARTESI_AUTH_KIND: "mnemonic" CARTESI_AUTH_MNEMONIC: "test test test test test test test test test test test junk" - CARTESI_POSTGRES_SSLMODE_ENABLED: "false" + CARTESI_POSTGRES_SSL_ENABLED: "false" diff --git a/docs/config.md b/docs/config.md index 67a4653ae..460f264a1 100644 --- a/docs/config.md +++ b/docs/config.md @@ -216,7 +216,7 @@ for more information. * **Type:** `string` * **Default:** `""` -## `CARTESI_POSTGRES_SSLMODE_ENABLED` +## `CARTESI_POSTGRES_SSL_ENABLED` When enabled, will connect to postgres database via SSL. diff --git a/internal/node/config/generate/Config.toml b/internal/node/config/generate/Config.toml index a1b9dfe27..c86fbebc4 100644 --- a/internal/node/config/generate/Config.toml +++ b/internal/node/config/generate/Config.toml @@ -206,7 +206,7 @@ It is also possible to set the endpoint without a password and load it from Post See [this](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-PASSFILE) for more information.""" -[postgres.CARTESI_POSTGRES_SSLMODE_ENABLED] +[postgres.CARTESI_POSTGRES_SSL_ENABLED] default = "true" go-type = "bool" description = """ diff --git a/internal/node/config/generated.go b/internal/node/config/generated.go index 24c899e2e..a3ceb8aff 100644 --- a/internal/node/config/generated.go +++ b/internal/node/config/generated.go @@ -456,14 +456,14 @@ func getPostgresEndpoint() string { return val } -func getPostgresSslmodeEnabled() bool { - s, ok := os.LookupEnv("CARTESI_POSTGRES_SSLMODE_ENABLED") +func getPostgresSslEnabled() bool { + s, ok := os.LookupEnv("CARTESI_POSTGRES_SSL_ENABLED") if !ok { s = "true" } val, err := toBool(s) if err != nil { - panic(fmt.Sprintf("failed to parse CARTESI_POSTGRES_SSLMODE_ENABLED: %v", err)) + panic(fmt.Sprintf("failed to parse CARTESI_POSTGRES_SSL_ENABLED: %v", err)) } return val } diff --git a/setup_env.sh b/setup_env.sh index 5b3fbf1a6..dda652e44 100644 --- a/setup_env.sh +++ b/setup_env.sh @@ -19,7 +19,7 @@ export CARTESI_AUTH_MNEMONIC="test test test test test test test test test test export CARTESI_POSTGRES_ENDPOINT="postgres://postgres:password@localhost:5432/postgres" export CARTESI_HTTP_ADDRESS="0.0.0.0" export CARTESI_HTTP_PORT="10000" -export CARTESI_POSTGRES_SSLMODE_ENABLED="false" +export CARTESI_POSTGRES_SSL_ENABLED="false" rust_bin_path="$PWD/cmd/authority-claimer/target/debug" # Check if the path is already in $PATH