add docker environment

This commit is contained in:
2020-01-20 15:58:04 +01:00
parent bcd17e1038
commit 3a9243bfb8
7 changed files with 117 additions and 20 deletions

View File

@ -1,5 +1,5 @@
MESSAGE_ROOT_PATH = 'messages'
DATABASE_DIR = 'database'
DATABASE_DIR = '/var/cache/risotto/database'
INTERNAL_USER = 'internal'
CONFIGURATION_DIR = 'configurations'
TEMPLATE_DIR = 'templates'

View File

@ -249,7 +249,6 @@ class RegisterDispatcher:
# valid function's arguments
db_conf = get_config().get('database')
#postgres://user:pass@host:port/database?option=value.
engine = db_conf.get('engine')
host = db_conf.get('host')
dbname = db_conf.get('dbname')
@ -257,7 +256,6 @@ class RegisterDispatcher:
dbpassword = db_conf.get('password')
dbport = db_conf.get('port')
cfg = "{}://{}:{}@{}:{}/{}".format(engine, dbuser, dbpassword, host, dbport, dbname)
print(cfg)
self.pool = await asyncpg.create_pool(cfg)
async with self.pool.acquire() as connection:
async with connection.transaction():