Last active
May 7, 2020 10:59
-
-
Save davidrv87/77bccfd431bee80b88b4672f7606847f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| ENV=dev | |
| DYNAMO_DB_URL=dynamodb.eu-central-1.amazonaws.com | |
| DYNAMO_DAX_ENDPOINT= | |
| DYNAMO_FEATURE_TOGGLE_TABLE=ape-feature-toggle | |
| DYNAMO_USER_DEVICE_TABLE=ape-user-device | |
| DYNAMO_LOOKUP_TABLE=ape-lookup | |
| DYNAMO_WHITELIST_LOG_TABLE=ape-whitelist-log | |
| DYNAMO_FREE_TRIAL_LAST_CHECK_TABLE=ape-free-trial-last-check | |
| DYNAMO_FREE_TRIAL_WHITELIST_TABLE=ape-free-trial-whitelist | |
| DYNAMO_IP_WHITELIST_TABLE=ape-ip-whitelist | |
| DEVICE_PAIR_QUEUE=<QUEUE_URL> |
This file contains hidden or 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
| TMX_BASE_URL=https://h-api.online-metrix.net | |
| TMX_ORG_ID=bq5vuezt | |
| TMX_API_KEY=<TMX-API-KEY> | |
| CORS_ORIGINS=https://example.com,https://example2.co | |
| VAULT_ADDR=https://this.vault.indazn.com |
This file contains hidden or 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
| function set_env_vars() { | |
| read -p "Enter environment (local (only sca), dev, test, stage) [dev]: " ENV_TO_SET | |
| ENV_TO_SET=${ENV_TO_SET:-dev} | |
| echo -e "\033[0;33mEnvironment set to '$ENV_TO_SET'\033[0;00m" | |
| read -p "Enter service (preflight, paynow, sca, ape) [paynow]: " SERVICE | |
| SERVICE=${SERVICE:-paynow} | |
| echo -e "\033[0;33mService set to '$SERVICE'\033[0;00m" | |
| echo -e "\033[0;34mSetting the following environment variables...\033[0;00m" | |
| cat ~/environments/$SERVICE/common | |
| cat ~/environments/$SERVICE/$ENV_TO_SET | |
| eval "$(cat ~/environments/$SERVICE/common | sed 's/^/export /g')" | |
| eval "$(cat ~/environments/$SERVICE/$ENV_TO_SET | sed 's/^/export /g')" | |
| if [[ $SERVICE == "sca" && $ENV_TO_SET == "local" ]]; then | |
| echo -e "\033[0;31mRemember to start DynamoDB in Docker!\033[0;00m" | |
| echo "docker run -d --rm --name localstack_dynamo -e FORCE_NONINTERACTIVE=1 -p 8001:8000 dwmkerr/dynamodb -sharedDb" | |
| fi | |
| echo -e "\033[1;32mDone!\033[0;00m" | |
| } | |
| function unset_env_vars() { | |
| read -p "Enter service (preflight, paynow, sca, ape) [paynow]: " SERVICE | |
| SERVICE=${SERVICE:-paynow} | |
| echo -e "\033[0;33mService set to '$SERVICE'\033[0;00m" | |
| echo -e "\033[0;34mUnsetting the following environment variables...\033[0;00m" | |
| cat ~/environments/$SERVICE/common | cut -d'=' -f1 | |
| cat ~/environments/$SERVICE/dev | cut -d'=' -f1 | |
| eval "$(cat ~/environments/$SERVICE/common | cut -d'=' -f1 | sed 's/^/unset /g')" | |
| eval "$(cat ~/environments/$SERVICE/dev | cut -d'=' -f1 | sed 's/^/unset /g')" | |
| if [[ $SERVICE == "sca" ]]; then | |
| eval "$(cat ~/environments/$SERVICE/local | cut -d'=' -f1 | sed 's/^/unset /g')" | |
| fi | |
| echo -e "\033[0;32mDone!\033[0;00m" | |
| } |
This file contains hidden or 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 gist is about setting up envs |
This file contains hidden or 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
| LOG_LEVEL=DEBUG | |
| NODE_ENV=dev | |
| ENV=dev | |
| PAYNOW_API_KEY=<API_KEY> |
This file contains hidden or 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
| ADYEN_API_KEY=<ADYEN_API_KEY> | |
| ADYEN_MERCHANT_ACCOUNT=PerformGroupPaynow | |
| ADYEN_PAYMENTS_URL=https://pal-test.adyen.com | |
| ADYEN_CHECKOUT_URL=https://checkout-test.adyen.com | |
| DYNAMO_DB_SESSION_TABLE=adyen-session | |
| DYNAMO_DB_URL=http://localhost:8001 | |
| BASE_URL=https://backend-url | |
| AWS_REGION=eu-central-1 | |
| PAYNOW_API_KEY=<X_API_KEY> |
This file contains hidden or 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
| ENV=dev | |
| DYNAMO_DB_TABLE=be-dev-cards-preflight-service-sessions | |
| COUNTRY_TOGGLES_DB_TABLE=be-dev-cards-preflight-service-country-toggles |
This file contains hidden or 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
| ADYEN_URL=https://checkout-test.adyen.com | |
| ADYEN_API_KEY=<ADYEN_API_KEY> | |
| ADYEN_MERCHANT_ACCOUNT=PerformGroupPreflight | |
| ADYEN_PAYMENTS_URL=https://pal-test.adyen.com/pal/servlet/Payment/v46 | |
| CORS_ORIGINS=https://example.com,https://example2.co |
This file contains hidden or 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
| ENV=dev | |
| DYNAMO_DB_SESSION_TABLE=be-<ENV>-cards-preflight-service-sessions | |
| DYNAMO_DB_TOGGLE_TABLE=be-<ENV>-cards-preflight-service-country-toggles | |
| TEST_TARGET=dev | |
| BASE_URL=https://secure-card-auth.payments.dazn-<ENV>.com |
This file contains hidden or 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
| ADYEN_CHECKOUT_URL=https://checkout-test.adyen.com | |
| ADYEN_API_KEY=<ADYEN_API_KEY> | |
| ADYEN_PAYMENTS_URL=https://pal-test.adyen.com/pal/servlet/Payment/v46 | |
| CORS_ORIGINS=https://example.com,https://example2.co | |
| DYNAMO_DB_URL=dynamodb.eu-central-1.amazonaws.com | |
| VAULT_ADDR=https://this.vault.indazn.com | |
| TF_VAR_datadog_app_key=<DATADOG_APP_KEY> | |
| TF_VAR_datadog_api_key=<DATADOG_API_KEY> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment