Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3137e42
Showing
7 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/_build | ||
/deps | ||
erl_crash.dump | ||
*.ez |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2014 Paul Schoenfelder | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Conform | ||
|
||
The definition of conform is "Adapt or conform oneself to new or | ||
different conditions". As this library is used to adapt your application | ||
to it's deployed environment, I think it's rather fitting. It's also a | ||
play on the word configuration, and the fact that Conform uses an init-style configuration, maintained in a `.conf` file. | ||
|
||
Conform is a library for Elixir applications, specifically in the | ||
release phase. Elixir already offers a convenient configuration | ||
mechanism via `config/config.exs`, but it has downsides: | ||
|
||
- Configuration is converted to an app.config or sys.config at compile time, which is not useful for applications which require environment-specific configuration, such as app secrets, connection strings, etc. | ||
- Modifying the configuration requires you to recompile your app to regenerate the app.config/sys.config files used by the VM. Alternatively you can modify the sys.config file directly during deployment, using Erlang terms. Neither of these things are ops-friendly, or necessarily accessible to sysadmins who may not understand Elixir or Erlang semantics. | ||
- You can put comments in `config/config.exs`, but once transformed to app.config/sys.config, those comments are lost, leaving sysadmins lost when trying to understand what configuration values are allowed and what they do. | ||
|
||
Conform is intended to fix these problems in the following way: | ||
|
||
- It uses an init-style configuration, which should be very familiar to any sysadmin. | ||
- It is intended to be used during the release process, once your app has been deployed. | ||
- It makes use of the configuration generated by `config/config.exs` as the default configuration, but gives sysadmins an easy way to tune and configure your app in production. | ||
- Conform works by taking `config/schema.exs`, combining the schema with values provided in `config/config.exs`, and generating a `config/myapp.conf` file which can then be modified prior to app startup. The `config/myapp.conf` file is then transformed into the `sys.config` file used by the VM for application configuration. Any documentation provided in `schema.exs` is also displayed in the `myapp.conf` file, so that individuals maintaing the config are able to easily understand the constraints. | ||
- No compilation step required. | ||
|
||
This project is just getting started, but stay tuned for more. This will | ||
be rolled in to exrm in the near future, as soon as this is ready for | ||
production. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
defmodule Conform do | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
defmodule Conform.Mixfile do | ||
use Mix.Project | ||
|
||
def project do | ||
[app: :conform, | ||
version: "0.0.1", | ||
elixir: "~> 0.13.2-dev", | ||
description: description, | ||
package: package, | ||
deps: deps] | ||
end | ||
|
||
def application do | ||
[applications: []] | ||
end | ||
defp deps, do: [] | ||
defp description, do: "Easy release configuration for Elixir apps." | ||
defp package do | ||
[ files: ["lib", "priv", "mix.exs", "README.md", "LICENSE"], | ||
contributors: ["Paul Schoenfelder"], | ||
licenses: ["MIT"], | ||
links: [ { "GitHub", "https://github.com/bitwalker/conform" } ] ] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
defmodule ConformTest do | ||
use ExUnit.Case | ||
|
||
test "the truth" do | ||
assert 1 + 1 == 2 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ExUnit.start |