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