Skip to content

Commit

Permalink
Update for fly.io (#10)
Browse files Browse the repository at this point in the history
point to grisp.io and port 7777 as defaults
  • Loading branch information
ziopio authored Jul 18, 2023
1 parent a8396a7 commit 16ff16c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
3 changes: 1 addition & 2 deletions config/sys.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[
{grisp_cloud, []}
{grisp_seawater, [
% {device_linking_token, <<"...">>}
{device_linking_token, <<"...">>}
]}
].
6 changes: 3 additions & 3 deletions grisp/default/common/deploy/files/erl_inetrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
%--- Erlang Inet Configuration -------------------------------------------------

% Add hosts
{host, {149,248,205,211}, ["seawater.fly.dev"]}.
{host, {46,101,169,235}, ["seawater.stritzinger.com"]}.
{host, {212,18,3,19}, ["0.europe.pool.ntp.org"]}.
{host, {149,248,205,211}, ["grisp.io"]}.
{host, {46,101,169,235}, ["seawater.stritzinger.com"]}. % old
{host, {212,25,1,1}, ["0.europe.pool.ntp.org"]}.

% Do not monitor the hosts file
{hosts_file, ""}.
Expand Down
6 changes: 3 additions & 3 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{erl_opts, [debug_info]}.
{deps, [
grisp,
grisp_cryptoauth,
{grisp, {git, "[email protected]:grisp/grisp.git", {branch, "master"}}},
{grisp_cryptoauth, {git, "[email protected]:grisp/grisp_cryptoauth.git", {branch, "master"}}},
certifi,
{gun, "2.0.0"},
jsx
Expand All @@ -16,7 +16,7 @@

{grisp, [
{otp, [
{version, "23.3.4.11"}
{version, "25"}
]},
{deploy, [
{pre_script, "rm -rf /Volumes/GRISP/*"},
Expand Down
5 changes: 4 additions & 1 deletion src/grisp_seawater.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
gun,
jsx
]},
{env, []},
{env, [
{seawater_domain, "grisp.io"},
{seawater_port, 7777}
]},
{modules, []},
{links, []}
]}.
4 changes: 3 additions & 1 deletion src/grisp_seawater_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ start_link() ->
gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).

connect() ->
connect("seawater.stritzinger.com", 443).
{ok, Domain} = application:get_env(seawater_domain),
{ok, Port} = application:get_env(seawater_port),
connect(Domain, Port).

connect(Server, Port) ->
gen_server:call(?MODULE, {?FUNCTION_NAME, Server, Port}, 60_000).
Expand Down
5 changes: 1 addition & 4 deletions src/grisp_seawater_http.erl
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@
%--- Exports -------------------------------------------------------------------

% API functions
-export([open/0, open/2]).
-export([open/2]).
-export([close/1]).
-export([get/2]).


%--- API Functions -------------------------------------------------------------

%open() -> open("seawater.fly.dev", 443).
open() -> open("seawater.stritzinger.com", 443).

open(ServerName, Port) ->
case ssl_opts(ServerName) of
{error, _Reason} = Error -> Error;
Expand Down

0 comments on commit 16ff16c

Please sign in to comment.