play-rconf / play-rconf-http

Retrieves configuration hosted behind a simple HTTP server
MIT License
1 stars 0 forks source link
config configuration-management http play playframework playframework2

Play Remote Configuration - HTTP

Latest release JitPack Build GitHub license

Retrieves configuration hosted behind a simple HTTP server


About this project

In production, it is not always easy to manage the configuration files of a Play Framework application, especially when it running on multiple servers. The purpose of this project is to provide a simple way to use a remote configuration with a Play Framework application.

How to use

To enable this provider, just add the classpath "io.playrconf.provider.HttpProvider" and the following configuration:

remote-configuration {

  ## Provider - HTTP
  # ~~~~~
  # Retrieves configuration from a simple HTTP server
  http {

    # URL where is located the configuration file to fetch. You can
    # use basic authentication
    url = "https://username:password@domain.com/my-configuration.conf"
    url = ${?REMOTECONF_HTTP_URL}

    # Basic authentication
    basic-auth {
      username = ${?REMOTECONF_HTTP_BASICAUTH_USERNAME}
      password = ${?REMOTECONF_HTTP_BASICAUTH_PASSWORD}
    }
  }
}

License

This project is released under terms of the MIT license.