updated behaviour/mount of secrets.py

This commit is contained in:
Hendrik Behme committed 2019-08-27 14:32:48 +02:00
1 parent 04faed2f07
commit c54a656390
5 files changed
+19 -3

No files matched your search

+7 -3
View File
@@ -1,11 +1,15 @@
# IDE Folders
pm/../.idea/
.idea/
.env
# PY VENV
pm/venv/
# Tokens and Passwwords
pm/essentials/secrets.py
# Tokens and Passwwords (information will be fetched from .env)
# secrets.py
pm/pollmaster\.log
+2
View File
@@ -19,6 +19,8 @@ services:
# App - Container, where the main application runs
app:
restart: always
volumes:
- ./secrets.py:/data/pm/essentials/secrets.py
links:
- mongo
build:
Binary file not shown.
Binary file not shown.
+10
View File
@@ -0,0 +1,10 @@
import os
class Secrets:
def __init__(self):
self.dbl_token = '' # DBL token (only needed for public bot)
self.mongo_db = ('mongodb://%s:%s@mongo:27017/pollmaster' % (os.environ.get('MONGO_INITDB_ROOT_USERNAME'), os.environ.get('MONGO_INITDB_ROOT_PASSWORD')))
self.bot_token = os.environ.get('DISCORD_BOT_TOKEN') # official discord bot token
self.mode = 'development' # or production
SECRETS = Secrets()