Add extended release script

This commit is contained in:
Maciej Szlosarczyk 2019-06-03 12:00:53 +03:00
parent 1bb81e0118
commit d5c296af94
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
6 changed files with 51 additions and 4 deletions

View file

@ -6,7 +6,9 @@
{applications,
[kernel,
stdlib,
ssl]},
ssl,
lager,
lager_syslog]},
{env,[]},
{modules, []},

View file

@ -9,6 +9,8 @@
%% gen_server callbacks
-export([init/1, handle_cast/2, handle_call/3, start_link/1]).
-export([crl_file/0]).
-record(state, {socket, port, options}).
start_link(Port) ->

19
config/docker.config Normal file
View file

@ -0,0 +1,19 @@
[
{epp_proxy, [
{dev_mode, true},
{tcp_port, 3333},
{tls_port, 700},
{epp_session_url, "https://registry.test/epp/session/"},
{epp_command_url, "https://registry.test/epp/command/"},
{epp_error_url, "https://registry.test/epp/error/"},
{cacertfile_path, "/opt/ca/certs/ca.crt.pem"},
{certfile_path, "/opt/ca/certs/apache.crt"},
{keyfile_path, "/opt/ca/private/apache.key"},
{crlfile_path, "/opt/ca/crl/crl.pem"}]},
{lager, [
{handlers, [
{lager_console_backend, [{level, debug}]}
%% {lager_syslog_backend, ["epp_proxy", local1, info]}
]}
]}
].

View file

@ -25,8 +25,8 @@
{crlfile_path, "/opt/shared/ca/certs/key.pem"}]},
{lager, [
{handlers, [
{lager_console_backend, info},
{lager_syslog_backend, ["epp_proxy", local1, info]}
{lager_console_backend, [{level, debug}]}
%% {lager_syslog_backend, ["epp_proxy", local1, debug]}
]}
]}
].

View file

@ -13,10 +13,17 @@
xmerl]},
{sys_config, "./config/sys.config"},
{dev_mode, false},
{vm_args, "./config/vm.args"},
{include_erts, true},
{extended_start_script, true}]
{extended_start_script, true},
{extended_start_script_extensions, [
{reload, "extensions/reload"}
]},
{overlay, [{copy, "scripts/extensions/reload", "bin/extensions/reload"}]}
]
}.
{profiles, [{prod, [{relx, [{dev_mode, false},

17
scripts/extensions/reload Normal file
View file

@ -0,0 +1,17 @@
#!/bin/bash
case $1 in
help)
echo "bin/epp_proxy reload"
;;
*)
;;
esac
# get the status tuple from gameserver
Status=$(relx_nodetool eval "exit(whereis(epp_tls_acceptor), normal).")
# now print it out
code="Json = io:format(\"~p~n\", [$Status]),
halt()."
echo $(erl -boot no_dot_erlang -sasl errlog_type error -noshell -eval "$code")