All Projects → play-rconf → play-rconf

play-rconf / play-rconf

Licence: MIT License
Remote configuration for Play Framework

Programming Languages

java
68154 projects - #9 most used programming language
scala
5932 projects

Projects that are alternatives of or similar to play-rconf

juno-agent
juno-agent
Stars: ✭ 46 (+170.59%)
Mutual labels:  config, configuration-management
play-ebean
Play Ebean module
Stars: ✭ 29 (+70.59%)
Mutual labels:  play, playframework
DazzleConf
Incredible configuration library
Stars: ✭ 34 (+100%)
Mutual labels:  config, configuration-management
dotfiles
My personal app/env configs and dotfiles.
Stars: ✭ 27 (+58.82%)
Mutual labels:  config, configuration-management
php-nacos
阿里巴巴nacos配置中心-PHP客户端
Stars: ✭ 167 (+882.35%)
Mutual labels:  config, configuration-management
Simple Settings
A simple way to manage your project settings.
Stars: ✭ 165 (+870.59%)
Mutual labels:  config, configuration-management
configster
Rust library for parsing configuration files
Stars: ✭ 19 (+11.76%)
Mutual labels:  config, configuration-management
Appconfiguration
Questions, feedback and samples for Azure App Configuration service
Stars: ✭ 116 (+582.35%)
Mutual labels:  config, configuration-management
redconf
sync config from redis or others storage while the config values changed
Stars: ✭ 12 (-29.41%)
Mutual labels:  config, configuration-management
superconfig
Access environment variables. Also includes presence validation, type coercion and default values.
Stars: ✭ 33 (+94.12%)
Mutual labels:  config, configuration-management
Config
Easiest way to add multi-environment yaml settings to Rails, Sinatra, Pandrino and other Ruby projects.
Stars: ✭ 1,821 (+10611.76%)
Mutual labels:  config, configuration-management
parse it
A python library for parsing multiple types of config files, envvars & command line arguments that takes the headache out of setting app configurations.
Stars: ✭ 86 (+405.88%)
Mutual labels:  config, configuration-management
Node Convict
Featureful configuration management library for Node.js
Stars: ✭ 1,855 (+10811.76%)
Mutual labels:  config, configuration-management
ini
📝 Go INI config management. support multi file load, data override merge. parse ENV variable, parse variable reference. Dotenv file parse and loader. INI配置读取管理,支持多文件加载,数据覆盖合并, 解析ENV变量, 解析变量引用。DotEnv 解析加载
Stars: ✭ 72 (+323.53%)
Mutual labels:  config, configuration-management
Config
Library for managing environment variables in Clojure using EDN configuration files
Stars: ✭ 125 (+635.29%)
Mutual labels:  config, configuration-management
sitri
Sitri - powerful settings & configs for python
Stars: ✭ 20 (+17.65%)
Mutual labels:  config, configuration-management
Electrode Confippet
node.js environment aware application configuration
Stars: ✭ 109 (+541.18%)
Mutual labels:  config, configuration-management
Dynaconf
Configuration Management for Python ⚙
Stars: ✭ 2,082 (+12147.06%)
Mutual labels:  config, configuration-management
libconfini
Yet another INI parser
Stars: ✭ 106 (+523.53%)
Mutual labels:  config, configuration-management
climatecontrol
Python library for loading settings and config data from files and environment variables
Stars: ✭ 20 (+17.65%)
Mutual labels:  config, configuration-management

Play Remote Configuration

Latest release JitPack GitHub license

Remote configuration for Play Framework


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.

Available providers

Provider Classpath Repository
AWS DynamoDB io.playrconf.provider.DynamoDbProvider play-rconf/play-rconf-dynamodb
CoreOS etcd io.playrconf.provider.EtcdProvider play-rconf/play-rconf-etcd
GIT io.playrconf.provider.GitProvider play-rconf/play-rconf-git
HashiCorp Consul io.playrconf.provider.ConsulProvider play-rconf/play-rconf-consul
HTTP io.playrconf.provider.HttpProvider play-rconf/play-rconf-http
Redis io.playrconf.provider.RedisProvider play-rconf/play-rconf-redis

Add play-rconf to your project

build.sbt

resolvers += "jitpack" at "https://jitpack.io"

libraryDependencies += "com.github.play-rconf" % "play-rconf" % "release~YY.MM"

How to use

You can use this project in two ways. The first is to simply set the right application loader in your configuration file. The second, if you have an existing application loader, is to extend it with the class provided in this project : io.playrconf.ApplicationLoaderJava or io.playrconf.ApplicationLoaderScala.

application.conf (first way)

play {
  application {

    ## Application Loader
    # https://www.playframework.com/documentation/latest/JavaDependencyInjection
    # https://www.playframework.com/documentation/latest/ScalaDependencyInjection
    # ~~~~~
    loader = "io.playrconf.ApplicationLoaderJava"
    #loader = "io.playrconf.ApplicationLoaderScala"
  }
}

ApplicationLoader.java (second way)

import io.playrconf.ApplicationLoaderJava;

public class ApplicationLoader extends ApplicationLoaderJava {

    @Override
    public GuiceApplicationBuilder builder(final Context context) {
        final GuiceApplicationBuilder newInitialBuilder = super.builder(context);
        // Your custom code
        return newInitialBuilder;
    }
}

Configuration

## Remote configuration
# ~~~~~
# Allows usage of remote configuration. Configuration is fetched at
# the application start and merged into the the local configuration
# file
remote-configuration {

  # Providers to use. If you specify more than one, they will all
  # be used one after the other. The variable could be a single
  # string or a list of string containing the classpath of all
  # providers to use
  providers = [
  ]
  providers = ${?REMOTECONF_PROVIDERS}

  # Alternative way to specify the provider to use. The variable
  # must be a single string containing the classpath of the provider
  # to use
  provider = ""
  provider = ${?REMOTECONF_PROVIDER}
}

License

This project is released under terms of the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].