fix script

This commit is contained in:
Simon Larsen
2023-07-17 20:17:30 +01:00
parent d5b4bdbf6b
commit 908a7a2695
4 changed files with 11 additions and 19 deletions

View File

@@ -36,7 +36,7 @@ const init: Function = (): void => {
}
// write the file back to disk and exit.
fs.writeFileSync('./config.env.temp', linesInEnv.join('\n'));
fs.writeFileSync('./config.env', linesInEnv.join('\n'));
};
init();

View File

@@ -132,12 +132,12 @@ export AIRTABLE_BASE_ID=
# Plans
# This is in the format of <PlanName>,<PlanIdFromBillingProvider>,<MonthlySubscriptionPlanAmountInUSD>,<YearlySubscriptionPlanAmountInUSD>,<Order>,<TrialPeriodInDays>
# This is in the format of PlanName,PlanIdFromBillingProvider,MonthlySubscriptionPlanAmountInUSD,YearlySubscriptionPlanAmountInUSD,Order,TrialPeriodInDays
# Enterprise plan will have -1 which means custom pricing.
export SUBSCRIPTION_PLAN_BASIC=Basic,<priceMonthlyId>,<priceYearlyId>,0,0,1,0
export SUBSCRIPTION_PLAN_GROWTH=Growth,<priceMonthlyId>,<priceYearlyId>,0,0,2,14
export SUBSCRIPTION_PLAN_SCALE=Scale,<priceMonthlyId>,<priceYearlyId>,0,0,3,0
export SUBSCRIPTION_PLAN_ENTERPRISE=Enterprise,<priceMonthlyId>,<priceYearlyId>,-1,-1,4,14
export SUBSCRIPTION_PLAN_BASIC=Basic,priceMonthlyId,priceYearlyId,0,0,1,0
export SUBSCRIPTION_PLAN_GROWTH=Growth,priceMonthlyId,priceYearlyId,0,0,2,14
export SUBSCRIPTION_PLAN_SCALE=Scale,priceMonthlyId,priceYearlyId,0,0,3,0
export SUBSCRIPTION_PLAN_ENTERPRISE=Enterprise,priceMonthlyId,priceYearlyId,-1,-1,4,14
export DATABASE_BACKUP_DIRECTORY=/Backups
@@ -163,15 +163,15 @@ export DATABASE_MIGRATIONS_HOST=localhost
export DATABASE_MIGRATIONS_PORT=5400
# Global Probes
# This is in the format of GLOBAL_PROBE_<NAME>=<ProbeName>,<ProbeDescription>,<ProbeKey>
# This is in the format of GLOBAL_PROBE_NAME=ProbeName,ProbeDescription,ProbeKey
export GLOBAL_PROBE_1_NAME=OneUptime
export GLOBAL_PROBE_1_DESCRIPTION="Global probe to monitor oneuptime resources"
export SENDGRID_API_KEY=
# METERED PLANS: This is in the format of <MONTHLY_PRICE_ID>,<YEARLY_PRICE_ID>,<value per unit>,unitName
export METERED_PLAN_ACTIVE_MONITORING=<priceMonthlyId>,<priceYearlyId>,1,active-monitor,month
# METERED PLANS: This is in the format of MONTHLY_PRICE_ID,YEARLY_PRICE_ID,value per unit,unitName
export METERED_PLAN_ACTIVE_MONITORING=priceMonthlyId,priceYearlyId,1,active-monitor,month
# Twilio Settings

View File

@@ -187,22 +187,14 @@ source ~/.bashrc
#Run a scirpt to merge config.env.tpl to config.env
ts-node-esm ./Scripts/Install/MergeEnvTemplate.ts
cat config.env.temp | gomplate > config.env
rm config.env.temp
# Load env values from config.env
export $(grep -v '^#' config.env | xargs)
bash config.env
# Write env vars in config files.
for directory_name in $(find . -maxdepth 1 -type d) ; do
if [ -f "$directory_name/.env.tpl" ]; then
cat $directory_name/.env.tpl | gomplate > $directory_name/.env
fi
if [ -f "$directory_name/Dockerfile.tpl" ]; then
cat $directory_name/Dockerfile.tpl | gomplate > $directory_name/Dockerfile
fi

View File

@@ -16,7 +16,7 @@ set -e
bash configure.sh
# Load env values from config.env
export $(grep -v '^#' config.env | xargs)
bash config.env
sudo docker compose pull