forked from LiveCarta/LiveCartaMeta
update build env
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
DB_NAME="@lcDbName@"
|
||||
DB_HOST="@lcDbHost@"
|
||||
DB_USERNAME="@lcDbUsername@"
|
||||
DB_PASSWORD="@lcDbPassword@"
|
||||
|
||||
API_URL="@lcApiUrl@"
|
||||
API_KEY="@lcApiKey@"
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
description="Replace placeholders in config files" >
|
||||
<replace file="../.env.sample" token="@lcDbName@" value="${lcDbName}"/>
|
||||
<replace file="../.env.sample" token="@lcDbHost@" value="${lcDbHost}"/>
|
||||
<replace file="../.env.sample" token="@lcDbUsername@" value="${lcDbUsername}"/>
|
||||
<replace file="../.env.sample" token="@lcDbPassword@" value="${lcDbPassword}"/>
|
||||
|
||||
<replace file="../.env.sample" token="@lcApiUrl@" value="${lcApiUrl}"/>
|
||||
<replace file="../.env.sample" token="@lcApiKey@" value="${lcApiKey}"/>
|
||||
|
||||
@@ -12,6 +12,8 @@ class AppConfig:
|
||||
self.refresh()
|
||||
connect(
|
||||
db=CONFIGS['db']['name'],
|
||||
username=CONFIGS['db']['username'],
|
||||
password=CONFIGS['db']['password']
|
||||
host="mongodb://{host}:27017/{database}".format(host=CONFIGS['db']['host'], database=CONFIGS['db']['name'])
|
||||
)
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@ import os
|
||||
CONFIGS = {
|
||||
'db' : {
|
||||
'name' : os.environ['DB_NAME'],
|
||||
'host' : os.environ['DB_HOST']
|
||||
'host' : os.environ['DB_HOST'],
|
||||
'username' : os.environ['DB_USERNAME'],
|
||||
'password' : os.environ['DB_PASSWORD']
|
||||
},
|
||||
'application_credentials' : {
|
||||
'api_url' : os.environ['API_URL'],
|
||||
|
||||
Reference in New Issue
Block a user