Skip to content

Retrieves configuration hosted behind a simple HTTP server

License

Notifications You must be signed in to change notification settings

play-rconf/play-rconf-http

Repository files navigation

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:[email protected]/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.