Skip to content

Export RELEASE_NODE for ECS #3121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions rel/overlays/bin/server
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#!/bin/sh
cd -P -- "$(dirname -- "$0")"

if [ "$AWS_EXECUTION_ENV" = "AWS_ECS_EC2" ]; then
# ECS_EC2 service discovery works similarly to K8S service
IP=`echo $HOSTNAME | awk -F '.' '{print $1}' | sed s/ip-// | tr '-' '.'`
export RELEASE_NODE="lightning@${IP}"
fi

PHX_SERVER=true exec ./lightning start