temporal icon indicating copy to clipboard operation
temporal copied to clipboard

Document POSTGRES_SEEDS (or better yet, use a descriptive var name)

Open colelawrence opened this issue 2 years ago • 7 comments

Is your feature request related to a problem? Please describe. I have been very frustrated over the last two hours, because I haven't seen any documentation for how to actually customize the connection for my postgresql database.

I have finally realized after searching this codebase for POSTGRES_SEEDS that it is actually being used as "postgres connection host".

Describe the solution you'd like

I would strongly recommend rethinking the consistency of these environment variables, as it has lead me and to a great deal of confusion, or documenting all the docker-compose files with descriptions.

colelawrence avatar Mar 29 '22 13:03 colelawrence

Thanks, we are going to track this under a larger project to reconcile all the different ways temporal can be configured to a simple, and documented path.

jbreiding avatar Apr 11 '22 15:04 jbreiding

Unbelievable. @colelawrence This prob saved me hours of search 🤦

gajus avatar Jan 19 '23 19:01 gajus

In 2023 the best source for info about POSTGRES_SEEDS is still searching through the issues in github

fowlmouth avatar Aug 08 '23 15:08 fowlmouth

In 2023 the best source for info about POSTGRES_SEEDS is still searching through the issues in github

happyxhw avatar Aug 22 '23 08:08 happyxhw

Ditto this, just realised myself but its not obvious at all

MysticalMount avatar Jan 07 '24 13:01 MysticalMount

I ran into the same thing in 2024,

I was super confused by POSTGRES_SEEDS I assumed it was some type of Seed for randomness.

I had to look through source code of several projects to find this:

        default:
            sql:
                pluginName: "{{ $db }}"
                databaseName: "{{ default .Env.DBNAME "temporal" }}"
                connectAddr: "{{ default .Env.POSTGRES_SEEDS "" }}:{{ default .Env.DB_PORT "5432" }}"
                
        visibility:
            sql:
                {{ $visibility_seeds_default := default .Env.POSTGRES_SEEDS "" }}
                {{ $visibility_seeds := default .Env.VISIBILITY_POSTGRES_SEEDS $visibility_seeds_default }}

                databaseName: "{{ default .Env.VISIBILITY_DBNAME "temporal_visibility" }}"
                connectAddr: "{{ $visibility_seeds }}:{{ $visibility_port }}"
  • https://github.com/temporalio/temporal/blob/main/docker/config_template.yaml#L102

jxc876 avatar Feb 07 '24 17:02 jxc876

The Helm chart does reveal it but you have to dig into the templates for the configmap

MysticalMount avatar Feb 07 '24 17:02 MysticalMount