Skip to content

Allow configuration of gem #3

Description

@mrtnin

Currently, the Backy gem lacks the ability to be easily configured with different database connection settings. This issue aims to address this limitation by allowing the gem to take the database connection information either directly from Rails or through custom configuration.

  • Update the gem to automatically detect and use the Rails database configuration settings if no custom configuration is provided.
  • Modify the gem to prioritize using custom configuration settings if they are present, and fall back to using Rails configuration settings if custom settings are not available.

Example initializer in a Rails app:

Backy.configure do |config|
  config.adapter = :psql
  config.storage = :s3
  config.app_name = "flytaxi"
  config.environment = Rails.env
  config.s3_bucket = "flytaxi-backups"
  config.s3_region = "eu-central-1"
  config.s3_access_key_id = ENV["AWS_ACCESS_KEY_ID"]
  config.s3_secret_access_key = ENV["AWS_SECRET_ACCESS_KEY"]
  config.s3_endpoint = "https://s3.eu-central-1.amazonaws.com"
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions