I started learning temporal recently. i understand temporal can be configured with multiple database including postgres. but i noticed postgres is part of temporal docker compose. I would like to know if it is possible to make temporal use our local postgres sql. if yes could you please share how to configure that. i tried to modify docker-compose-postgres file but i am failed to do it because not sure what are the values to be changed? could you please help on this?
Take a look at connectAdr in docker config template. It shows the env vars used to create the connection to your db.
So in your docker compose environment section for the temporal container you can set
POSTGRES_SEEDS to the db address and
DB_PORT to the port
(as well as the user and password via
I am not sure if you have your db running on docker or not, if you need more info on setting that up see here.
If you need to set up mTLS between temporal server and your db see this article for more info.
If it helps here is docker compose I use with postgresql db running outside docker desktop (localhost). Note I run on Mac so can use
POSTGRES_SEEDS. Another option could be to start docker compose with
host network mode on and then should be able to set
POSTGRES_SEEDS to localhost or 127.0.0.1.
- ES_JAVA_OPTS=-Xms256m -Xmx256m
- type: bind
- type: bind
Thanks much @tihomir . i will try out this.
Btw, i see helm chart approach is not suggested for Production environment. can you also suggest how do we set up the Production?
Also, in my local after starting up the cluster when i execute my worker class, it is working fine. if i have the temporal cluster running in remote machine, how do i configure my worker class there?
i see helm chart approach is not suggested for Production environment. can you also suggest how do we set up the Production?
I think this applies for charts in the helm-charts repo. One reason is that some people might find helm to be hard to use and/or think it has limited limited functionality. Another reason is same as with the docker-compose repo, where for production we recommend installing your own db, prometheus, grafana etc, rather than using provided defaults.
See this section as well as the “Install with your own…” sections for more info.
The suggested approach is to use the helm charts as a way to generate manifests (via
helm template command) for only the temporal services and then use another method for deploying those manifests, as well as use dependencies such as db, etc external to the chart.