-
Notifications
You must be signed in to change notification settings - Fork 22
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 6204d8c
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,6 @@ | ||
ebin/ | ||
*.dump | ||
deps/ | ||
vmling | ||
.applist | ||
/log/ |
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,13 @@ | ||
ifeq ($(shell uname), Darwin) | ||
sync: | ||
fsevent_watch -F src/ | env PERLIO=:raw perl -ne 's#.*\t.*\t$$ENV{"PWD"}/src/.*erl$$#\2# && print "skip_deps=true\n"' | xargs -tn1 rebar compile | ||
else | ||
sync: | ||
fanotify_watch -c | env PERLIO=:raw perl -ne 's#.*\t.*\t$$ENV{"PWD"}/src/.*erl$$#\2# && print "skip_deps=true\n"' | xargs -tn1 rebar compile | ||
endif | ||
|
||
run: | ||
ERL_LIBS=deps erl -pa ebin -config run/sys.config \ | ||
-eval '[ok = application:ensure_started(A, permanent) || A <- [lager,asn1,crypto,public_key,ssl,mimetypes,hackney]]' | ||
|
||
.PHONY: run |
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 @@ | ||
{deps, [ | ||
{hackney, ".*", {git, "git@github.com:benoitc/hackney", {tag, "0.4.4"}}} | ||
, {lager, ".*", {git, "git@github.com:basho/lager", {tag, "2.0.0"}}} | ||
]}. |
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 @@ | ||
[ | ||
{lager, [ | ||
{handlers, [{lager_console_backend, info}]}, | ||
{crash_log, undefined}, | ||
{colored, true} | ||
]} | ||
]. |
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,12 @@ | ||
{application, erldocker, | ||
[ | ||
{description, ""}, | ||
{vsn, "1"}, | ||
{registered, []}, | ||
{applications, [ | ||
kernel, | ||
stdlib | ||
]}, | ||
{mod, { erldocker_app, []}}, | ||
{env, []} | ||
]}. |
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,16 @@ | ||
-module(erldocker_app). | ||
|
||
-behaviour(application). | ||
|
||
%% Application callbacks | ||
-export([start/2, stop/1]). | ||
|
||
%% =================================================================== | ||
%% Application callbacks | ||
%% =================================================================== | ||
|
||
start(_StartType, _StartArgs) -> | ||
erldocker_sup:start_link(). | ||
|
||
stop(_State) -> | ||
ok. |
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,28 @@ | ||
|
||
-module(erldocker_sup). | ||
|
||
-behaviour(supervisor). | ||
|
||
%% API | ||
-export([start_link/0]). | ||
|
||
%% Supervisor callbacks | ||
-export([init/1]). | ||
|
||
%% Helper macro for declaring children of supervisor | ||
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}). | ||
|
||
%% =================================================================== | ||
%% API functions | ||
%% =================================================================== | ||
|
||
start_link() -> | ||
supervisor:start_link({local, ?MODULE}, ?MODULE, []). | ||
|
||
%% =================================================================== | ||
%% Supervisor callbacks | ||
%% =================================================================== | ||
|
||
init([]) -> | ||
{ok, { {one_for_one, 5, 10}, []} }. | ||
|