Skip to content

Commit

Permalink
renaming relx target to demo, so demo scenarios are not included when…
Browse files Browse the repository at this point in the history
… amoc is used as dependecy
  • Loading branch information
DenysGonchar committed Jul 17, 2021
1 parent 5afcf6d commit bccbc5d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ MAINTAINER Erlang Solutions <mongoose-im@erlang-solutions.com>

RUN useradd -ms /bin/bash amoc

COPY --from=amoc-build /amoc_build/_build/prod/rel/amoc/ /home/amoc/amoc/
COPY --from=amoc-build /amoc_build/_build/demo/rel/amoc/ /home/amoc/amoc/
# It seems hub.docker.com does not support --chown param to COPY directive
RUN chown -R amoc:amoc /home/amoc/amoc

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ endif
all: rel

rel: rebar3
./rebar3 as prod tar
./rebar3 as demo tar

compile:
$(REBAR) as prod compile
$(REBAR) as demo compile

clean:
$(REBAR) clean
Expand Down Expand Up @@ -45,10 +45,10 @@ rebar3:
chmod u+x rebar3

dialyzer:
$(REBAR) as prod dialyzer
$(REBAR) as demo dialyzer

xref:
$(REBAR) as prod xref
$(REBAR) as demo xref

console:
@echo "tests can be executed manually using ct:run/1 function:\n" \
Expand Down
2 changes: 1 addition & 1 deletion doc/local-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Everything you need to do is to create the release. To achieve that run:
`make rel`. Now you are ready to test our scenario locally with one Amoc node;
to start the node run `_build/prod/rel/amoc/bin/amoc console`.
to start the node run `_build/demo/rel/amoc/bin/amoc console`.

Start `my_scenario` spawning 10 amoc users with IDs from range (1,10) inclusive.
```erlang
Expand Down
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
]}
]},
{elvis, [{plugins, [{rebar3_lint, "0.1.11"}]}]},
{prod, [
{demo, [
{erl_opts, [{src_dirs, ["src", "scenarios"]}]},
{relx, [
{release, {amoc, git}, [amoc, runtime_tools]},
Expand Down

0 comments on commit bccbc5d

Please sign in to comment.