snowplow / snowbridge

For replicating streams across clouds, accounts and regions
Other
15 stars 7 forks source link

Add empty `/tmp/config.hcl` file to Dockerfile #356

Closed pondzix closed 4 months ago

pondzix commented 4 months ago

PDP-1303

/tmp/config.hcl is the default value for SNOWBRIDGE_CONFIG_FILE environment variable when running docker image. It means it's the default location where Snowbridge tries to find and load configuration.

Without mounting /tmp/config.hcl explicitly or setting custom SNOWBRIDGE_CONFIG_FILE variable, Snowbridge would crash. Creating empty file and saving it as /tmp/config.hcl in Dockerfile ensures Snowbridge doesn't fail even when none of the above is set by user. It simply runs using defaults.

It's still possible to mount /tmp/config.hcl explicitly and overwrite default empty file.

colmsnowplow commented 4 months ago

Just to double-check, have you confirmed that it doesn't change anything when you DO mount the config to that path?

pondzix commented 4 months ago

@colmsnowplow

Just to double-check, have you confirmed that it doesn't change anything when you DO mount the config to that path?

So this:

docker run --mount type=bind,source=/my_custom_config.hcl,target=/tmp/config.hcl snowplow/snowbridge

still works and uses config from my_custom_config.hcl. Is that OK?

colmsnowplow commented 4 months ago

Yup, that's all that needed to be checked!