Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow 'instance' parameter in database.yml to be set via environment variable #325

Open
buhlmann-thomas-rix opened this issue Apr 24, 2024 · 1 comment

Comments

@buhlmann-thomas-rix
Copy link

When using MS SQL Server with a named instance as database server, it is required to set the name of the instance in the instance parameter in config/database.yml. Using sql-server-host\instance_name for host parameter does not work.

Please introduce a new environment variable, e.g. REDMINE_DB_SQLSERVER_INSTANCE, that allows setting the name of the database instance to connect to.

Currently, I created a workaround by exporting the config/database.yml file via a Docker volume to my local filesystem and altering its contents manually. But this should not be the official way doing this.

Working example:

production:
  adapter: "sqlserver"
  host: "sql-server-host"
  instance: "instance_name"
  port: "61602"
  username: "sql-username"
  password: "super-secret-sql-password"
  database: "REDMINE"
  encoding: "utf-8"
@LaurentGoderre
Copy link
Member

I believe it's reasonable to rely on the config file for db connection that require more complex config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants