semaphore: Unable to connect to Postgres from Docker with sslmode disabled.
No env var SEMAPHORE_DB_OPTIONS for Docker image to disable sslmode for Postgres.
https://github.com/ansible-semaphore/semaphore/issues/745#issuecomment-1082980602
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 17
Hi there - thanks for raising this issue. I believe the main change will be in this file: deployment/docker/common/semaphore-wrapper
Perhaps we could do something like this:
Provide an env var called
SEMAPHORE_DB_OPTIONS_SSLMODEwith an empty default value.And then some code in the wrapper file that does something like:
And then later in the same file, around line 71, we’ll need to include this when writing the config file.
Sorry I can’t be more help. I don’t really understand how this wrapper creates the config file that can be read by Semaphore but hopefully this will help steer someone in the right direction.
Great, so sslmode is now disabled by default.
…but I need sslmode to work with my Postgres.
🤦
@abeastmal @Zorlin Setting this as a environment variable in my configmap for kubernetes worked;
SEMAPHORE_DB_OPTIONS: '{ "sslmode": "require" }'@fiftin I saw this in my container (I’m running it in kubernetes BTW, latest image)
Allowing non ssl connections was the only workaround for now