Skip to content

Commit

Permalink
Add .env file to be able to run the server manually in Office Argenti…
Browse files Browse the repository at this point in the history
…na server (macOS) (#966)

* Add .env file to be able to run the server manually

* Test

* Test

---------

Co-authored-by: Nicolas Sanchez <[email protected]>
  • Loading branch information
klaus993 and Nico-Sanchez authored Nov 5, 2024
1 parent da9b4dd commit 3d1cc7c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions devops/deploy-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,33 @@ if [ ${RELEASE} == "central_backend" ]; then
mix ecto.migrate
fi

cat <<EOF >$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
Expand Down Expand Up @@ -54,4 +81,6 @@ export NEWRELIC_KEY=$NEWRELIC_KEY
rm -rf ${HOME}/arena/mirra_backend
mv /tmp/mirra_backend ${HOME}/arena/

export $(cat .env | xargs)

/Users/lambdaclass/arena/mirra_backend/_build/prod/rel/arena/bin/arena daemon

0 comments on commit 3d1cc7c

Please sign in to comment.