The migration service completes as expected, creating the necessary tables in my RDS instance. However, the setup-config service throws the following error:
setup-config-1 | Generating encryption keys for Hatchet server
setup-config-1 | Generating config files /hatchet/config
setup-config-1 | 2024/08/16 14:34:59 User `hatchet` was denied access on the database `hatchet.public`
setup-config-1 | panic: spawn: query engine errored: User `hatchet` was denied access on the database `hatchet.public`
setup-config-1 |
setup-config-1 | goroutine 1 [running]:
...
service "setup-config" didn't complete successfully: exit 2
It appears that the sslmode parameter in the DATABASE_URL is being overridden or ignored. When I explicitly add the DATABASE_POSTGRES_SSL_MODE environment variable to the docker-compose.yml, the issue is resolved, and the application starts successfully. Here is the updated setup-config service configuration:
When deploying the application using the following
docker-compose.yml
:The migration service completes as expected, creating the necessary tables in my RDS instance. However, the setup-config service throws the following error:
It appears that the sslmode parameter in the DATABASE_URL is being overridden or ignored. When I explicitly add the DATABASE_POSTGRES_SSL_MODE environment variable to the docker-compose.yml, the issue is resolved, and the application starts successfully. Here is the updated setup-config service configuration:
Since my RDS instance requires SSL mode, adding the DATABASE_POSTGRES_SSL_MODE environment variable resolved the issue.
I believe updating the documentation or the default environment variables for setup-config could help others avoid this issue.
Thank you for your consideration!