I’d like to create a temporal cluster locally but spin up persistence in a hosted postgres instance. I’ve been hacking away with some of the docker-compose examples but keep running into tls issues when attempting to connect to the persistence layer.
Before I start another thread on the specific errors, is there a good guide for doing something like this?
What issues are you running into? Here is the docker template for reference. This forum post has a sample compose file with mysql running locally.
Would encourage you not to use auto-setup server image for anything but local testing. Here is a sample compose that deploys each server role in own container.
I want to point my local cluster to a postgres instance hosted on render.com. I’ve been able to spin up a postgres instance and created the temporal, temporal_visibility dbs.
I can see the auto-setup logs from this script. I can see that it correctly applies the schemas and verifies them. That it’s able to connect to my hosted db.
It’s failing to start with this error: Unable to start server. Error: could not build arguments for function "go.temporal.io/server/common/pprof".LifetimeHooks (/home/builder/temporal/common/pprof/fx.go:39): failed to build *pprof.PProfInitializerImpl: could not build arguments for function "go.temporal.io/server/common/pprof".NewInitializer (/home/builder/temporal/common/pprof/pprof.go:56): failed to build *config.PProf: received non-nil error from function "go.temporal.io/server/temporal".ServerOptionsProvider (/home/builder/temporal/temporal/fx.go:152): sql schema version compatibility check failed: EOF
I’ve tried digging into the source code but cannot find where it could fail with an EOF. I suspect it has something to do with the TLS settings (and not providing certs).
Then I had to set
SQL_HOST_VERIFICATION=true
SQL_CA=<path to ca for tailscale (using a tailscale subnet router and configuring certs for my local machine)>
SQL_CERT=<path to the cert for my local machine (generated from tailscale)>
SQL_CERT_KEY=<path to the cert for my local machine (generated from tailscale)>
Then I was able to hook up my local cluster to a db in render. Thank you for the help!