Skip to content

Commit f4b2965

Browse files
daroraedgurgel
andauthored
fix: support for clustering when run within k8s (#1486)
--------- Co-authored-by: Eduardo Gurgel Pinho <[email protected]>
1 parent 321a511 commit f4b2965

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule Realtime.MixProject do
44
def project do
55
[
66
app: :realtime,
7-
version: "2.41.22",
7+
version: "2.41.23",
88
elixir: "~> 1.17.3",
99
elixirc_paths: elixirc_paths(Mix.env()),
1010
start_permanent: Mix.env() == :prod,

rel/env.sh.eex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
# for Fly.io
88
ip=$(grep fly-local-6pn /etc/hosts | cut -f 1)
99

10-
# for AWS ECS Fargate
1110
if [ "$AWS_EXECUTION_ENV" = "AWS_ECS_FARGATE" ]; then
11+
# for AWS ECS Fargate
1212
ip=$(hostname -I | awk '{print $3}')
13+
elif [ -n "${POD_IP}" ]; then
14+
# for kubernetes
15+
ip=${POD_IP}
1316
fi
1417

1518
# default to localhost

0 commit comments

Comments
 (0)