From ca487d0037c96c8e319741cd92ad2380072cffe7 Mon Sep 17 00:00:00 2001 From: Klaus Lungwitz Date: Fri, 27 Sep 2024 15:14:28 -0300 Subject: [PATCH 1/3] Add .env file to be able to run the server manually --- devops/deploy-macos.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/devops/deploy-macos.sh b/devops/deploy-macos.sh index 32b4b77ff..ce2d2f48c 100755 --- a/devops/deploy-macos.sh +++ b/devops/deploy-macos.sh @@ -25,6 +25,33 @@ if [ ${RELEASE} == "central_backend" ]; then mix ecto.migrate fi +cat <$HOME/.env${_SERVICE_SUFFIX} +PHX_HOST=${PHX_HOST} +DATABASE_URL=${DATABASE_URL} +PHX_SERVER=${PHX_SERVER} +SECRET_KEY_BASE=${SECRET_KEY_BASE} +JWT_PRIVATE_KEY_BASE_64=${JWT_PRIVATE_KEY_BASE_64} +PORT=${PORT} +RELEASE_NODE=${RELEASE_NODE} +_SERVICE_SUFFIX=${_SERVICE_SUFFIX} +GATEWAY_URL=${GATEWAY_URL} +METRICS_ENDPOINT_PORT=${METRICS_ENDPOINT_PORT} +OVERRIDE_JWT=${OVERRIDE_JWT} +GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID} +BOT_MANAGER_PORT=${BOT_MANAGER_PORT} +BOT_MANAGER_HOST=${BOT_MANAGER_HOST} +CONFIGURATOR_HOST=${CONFIGURATOR_HOST} +CONFIGURATOR_GOOGLE_CLIENT_ID=${CONFIGURATOR_GOOGLE_CLIENT_ID} +CONFIGURATOR_GOOGLE_CLIENT_SECRET=${CONFIGURATOR_GOOGLE_CLIENT_SECRET} +RELEASE=${RELEASE} +TARGET_SERVER=${TARGET_SERVER} +LOADTEST_EUROPE_HOST=${LOADTEST_EUROPE_HOST} +LOADTEST_BRAZIL_HOST=${LOADTEST_BRAZIL_HOST} +LOADTEST_CHILE_HOST=${LOADTEST_CHILE_HOST} +NEWRELIC_APP_NAME=${NEWRELIC_APP_NAME} +NEWRELIC_KEY=${NEWRELIC_KEY} +EOF + export PHX_HOST=$PHX_HOST export DATABASE_URL=$DATABASE_URL export PHX_SERVER=$PHX_SERVER From 03596b0c1a0b57c949d598ab5fdc375a8e0c0f4b Mon Sep 17 00:00:00 2001 From: Nicolas Sanchez Date: Mon, 4 Nov 2024 18:33:46 -0300 Subject: [PATCH 2/3] Test --- devops/deploy-macos.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devops/deploy-macos.sh b/devops/deploy-macos.sh index ce2d2f48c..cb2c95813 100755 --- a/devops/deploy-macos.sh +++ b/devops/deploy-macos.sh @@ -81,4 +81,7 @@ export NEWRELIC_KEY=$NEWRELIC_KEY rm -rf ${HOME}/arena/mirra_backend mv /tmp/mirra_backend ${HOME}/arena/ +export $(cat .env | xargs) +arena daemon + /Users/lambdaclass/arena/mirra_backend/_build/prod/rel/arena/bin/arena daemon From a9b66eba883f6d6299d14bbefb03584626973ef9 Mon Sep 17 00:00:00 2001 From: Nicolas Sanchez Date: Mon, 4 Nov 2024 18:37:26 -0300 Subject: [PATCH 3/3] Test --- devops/deploy-macos.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/devops/deploy-macos.sh b/devops/deploy-macos.sh index cb2c95813..bf4beccd3 100755 --- a/devops/deploy-macos.sh +++ b/devops/deploy-macos.sh @@ -82,6 +82,5 @@ rm -rf ${HOME}/arena/mirra_backend mv /tmp/mirra_backend ${HOME}/arena/ export $(cat .env | xargs) -arena daemon /Users/lambdaclass/arena/mirra_backend/_build/prod/rel/arena/bin/arena daemon