-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(dev): add
SSH_USER
and SSH_HOST
- Loading branch information
1 parent
86bad45
commit 328cbb3
Showing
5 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ docker context use "${MUSE_DOCKER_DEFAULT_CONTEXT}" | |
if [ "$stage" != "local" ]; then | ||
context_name=muse-deploy-server | ||
if ! docker context ls --format '{{.Name}}' | grep -q "^${context_name}$"; then | ||
docker context create "${context_name}" --description "[MUSE] Deploy Server" --docker "host=ssh://[email protected]" | ||
docker context create "${context_name}" --description "[MUSE] Deploy Server" --docker "host=ssh://${SSH_USER}@${SSH_HOST}" | ||
fi | ||
|
||
docker context use muse-deploy-server | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ rootDir="$currentDir/../../" | |
|
||
[[ -z "${MUSE_DOCKER_DEFAULT_CONTEXT}" ]] && { echo "'MUSE_DOCKER_DEFAULT_CONTEXT' is not set. Exiting."; exit 1; } | ||
[[ -z "${MUSE_JWT_SECRET_KEY}" ]] && { echo "'MUSE_JWT_SECRET_KEY' is not set. Exiting."; exit 1; } | ||
[[ -z "${SSH_USER}" ]] && { echo "'SSH_USER' is not set. Exiting."; exit 1; } | ||
[[ -z "${SSH_HOST}" ]] && { echo "'SSH_HOST' is not set. Exiting."; exit 1; } | ||
|
||
trap 'docker context use "${MUSE_DOCKER_DEFAULT_CONTEXT}"' EXIT | ||
|
||
|
@@ -32,7 +34,7 @@ fi | |
if [ "$stage" != "local" ]; then | ||
context_name=muse-$stage | ||
if ! docker context ls --format '{{.Name}}' | grep -q "^${context_name}$"; then | ||
docker context create "${context_name}" --description "[MUSE] '$stage' Deploy Server" --docker "host=ssh://[email protected]" | ||
docker context create "${context_name}" --description "[MUSE] '$stage' Deploy Server" --docker "host=ssh://${SSH_USER}@${SSH_HOST}" | ||
fi | ||
|
||
docker context use "$context_name" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ rootDir="$currentDir/../../" | |
|
||
[[ -z "${MUSE_DOCKER_DEFAULT_CONTEXT}" ]] && { echo "'MUSE_DOCKER_DEFAULT_CONTEXT' is not set. Exiting."; exit 1; } | ||
[[ -z "${MUSE_JWT_SECRET_KEY}" ]] && { echo "'MUSE_JWT_SECRET_KEY' is not set. Exiting."; exit 1; } | ||
[[ -z "${SSH_USER}" ]] && { echo "'SSH_USER' is not set. Exiting."; exit 1; } | ||
[[ -z "${SSH_HOST}" ]] && { echo "'SSH_HOST' is not set. Exiting."; exit 1; } | ||
|
||
trap 'docker context use "${MUSE_DOCKER_DEFAULT_CONTEXT}"' EXIT | ||
|
||
|
@@ -27,7 +29,7 @@ docker context use "${MUSE_DOCKER_DEFAULT_CONTEXT}" | |
if [ "$stage" != "local" ]; then | ||
context_name=muse-$stage | ||
if ! docker context ls --format '{{.Name}}' | grep -q "^${context_name}$"; then | ||
docker context create "${context_name}" --description "[MUSE $stage] Deploy Server" --docker "host=ssh://[email protected]" | ||
docker context create "${context_name}" --description "[MUSE $stage] Deploy Server" --docker "host=ssh://${SSH_USER}@${SSH_HOST}" | ||
fi | ||
|
||
docker context use "$context_name" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ currentDir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) | |
rootDir="$currentDir/../../" | ||
|
||
[[ -z "${MUSE_DOCKER_DEFAULT_CONTEXT}" ]] && { echo "'MUSE_DOCKER_DEFAULT_CONTEXT' is not set. Exiting."; exit 1; } | ||
[[ -z "${SSH_USER}" ]] && { echo "'SSH_USER' is not set. Exiting."; exit 1; } | ||
[[ -z "${SSH_HOST}" ]] && { echo "'SSH_HOST' is not set. Exiting."; exit 1; } | ||
|
||
trap 'docker context use "${MUSE_DOCKER_DEFAULT_CONTEXT}"' EXIT | ||
|
||
|
@@ -26,7 +28,7 @@ docker context use "${MUSE_DOCKER_DEFAULT_CONTEXT}" | |
if [ "$stage" != "local" ]; then | ||
context_name=muse-$stage | ||
if ! docker context ls --format '{{.Name}}' | grep -q "^${context_name}$"; then | ||
docker context create "${context_name}" --description "[MUSE] '$stage' Deploy Server" --docker "host=ssh://[email protected]" | ||
docker context create "${context_name}" --description "[MUSE] '$stage' Deploy Server" --docker "host=ssh://${SSH_USER}@${SSH_HOST}" | ||
fi | ||
|
||
docker context use "$context_name" | ||
|