Consul-template and postgres

I’m trying to set up a container that runs postgres but checks the Consul KV store for any changes to its configuration, sending the appropriate signal to re-read the config file so that the value is immediately in force.

My limited understanding of docker containers suggests that one and only one service can run inside a container. Postgres would be once such service. Consul-template would be another service. So I’m sort of stuck in an either/or situation.

Can someone point me to the right way to set this up or offer up best practices as to how make this available as one container?

It was suggested to me to create a container that only contains consul-template but that is problematic because of the action involved as a result of a KV store change would be to force the database to re-read the configuration, which implies that the consul-template should have access somehow to the postgres container’s executables. It all seems a bit confusing but I’m hoping someone has tried this or something very similar and can guide me in some way.

Thanks!

Anybody? Is it possible to have consul-template and postgres running as services together in one container? Any examples and/or direction would be appreciated.