rebar3: define a release
Further with the release, rebar3 will also start the application when calling `rebar3 shell`. Change-Id: I76cb16e28b5bc6fb231566be1bd7905235fdf56b
This commit is contained in:
parent
be945307eb
commit
cdd84e4a5a
13
README.md
13
README.md
|
@ -27,20 +27,12 @@ Once osmo\_dia2gsup is built, you can start it this way:
|
|||
|
||||
```
|
||||
$ rebar3 shell
|
||||
1> osmo_dia2gsup:start().
|
||||
```
|
||||
|
||||
Passing a config file:
|
||||
|
||||
```
|
||||
$ rebar3 shell --config ./examples/sys.config
|
||||
1> osmo_dia2gsup:start().
|
||||
```
|
||||
|
||||
Running it with one shell command:
|
||||
|
||||
```
|
||||
$ rebar3 shell --config ./examples/sys.config --eval "osmo_dia2gsup:start()."
|
||||
```
|
||||
|
||||
Running it as an escript:
|
||||
|
@ -49,3 +41,8 @@ Running it as an escript:
|
|||
$ rebar3 escriptize
|
||||
$ ERL_FLAGS='-config ./examples/sys.config' _build/default/bin/osmo-dia2gsup
|
||||
```
|
||||
|
||||
## Build a new release
|
||||
|
||||
rebar3 release
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ Type=simple
|
|||
Restart=always
|
||||
Environment="HOME=/var/lib/osmo_dia2gsup"
|
||||
ExecStartPre=/usr/bin/mkdir -p /var/lib/osmo_dia2gsup
|
||||
ExecStart=/usr/bin/osmo-dia2gsup
|
||||
ExecStart=/usr/bin/osmo-dia2gsup foreground
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
|
|
|
@ -33,3 +33,12 @@
|
|||
{escript_incl_apps, [osmo_dia2gsup]}.
|
||||
{escript_main_app, osmo_dia2gsup}.
|
||||
{escript_name, "osmo-dia2gsup"}.
|
||||
|
||||
{relx,
|
||||
[{release, {'osmo-dia2gsup', {git, long}},
|
||||
[osmo_dia2gsup]},
|
||||
{sys_config, "./config/sys.config"},
|
||||
{vm_args, "./config/vm.args"},
|
||||
{dev_mode, false},
|
||||
{include_erts, true},
|
||||
{extended_start_script, true}]}.
|
||||
|
|
Loading…
Reference in New Issue