-
Notifications
You must be signed in to change notification settings - Fork 14
/
worker-entrypoint.sh
executable file
·28 lines (21 loc) · 1.43 KB
/
worker-entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
# Prod entrypoint for the application
# Fetch secrets from docker and set environment variables
export INFURA_PROJECT_ID=$(gcloud secrets versions access latest --secret=INFURA_PROJECT_ID)
export MIXPANEL_TOKEN=$(gcloud secrets versions access latest --secret=MIXPANEL_TOKEN)
export ETHERSCAN_API_KEY=$(gcloud secrets versions access latest --secret=ETHERSCAN_API_KEY)
export ALCHEMY_API_KEY=$(gcloud secrets versions access latest --secret=ALCHEMY_API_KEY)
export TELEGRAM_BOT_TOKEN=$(gcloud secrets versions access latest --secret=TELEGRAM_BOT_TOKEN)
export DISCORD_BOT_TOKEN=$(gcloud secrets versions access latest --secret=DISCORD_BOT_TOKEN)
export ETHPLORER_API_KEY=$(gcloud secrets versions access latest --secret=ETHPLORER_KEY)
export MIXPANEL_SECRET=$(gcloud secrets versions access latest --secret=MIXPANEL_SECRET)
export SOMM_STATS_BOT_TOKEN=$(gcloud secrets versions access latest --secret=SOMM_STATS_BOT_TOKEN)
export BITQUERY_API_KEY=$(gcloud secrets versions access latest --secret=APP_PROD_BITQUERY_API_KEY)
export REDIS_AUTH=$(gcloud secrets versions access latest --secret=REDIS_AUTH)
export REDIS_URL=$(gcloud secrets versions access latest --secret=APP_PROD_REDIS_URL)
export V3_SUBGRAPH_URL=$(gcloud secrets versions access latest --secret=APP_PROD_V3_SUBGRAPH_URL)
mkdir -p /var/log/app
touch "$APP_LOG"
touch "$APP_ERR_LOG"
/bin/bash /dd-agent-init.sh
pm2-runtime /app/il-loss-charts/ecosystem.config.js --only app-worker