updated behaviour/mount of secrets.py
This commit is contained in:
1 parent
04faed2f07
commit
c54a656390
5 files changed
+19
-3
No files matched your search
+7
-3
@@ -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
|
||||
|
||||
|
||||
@@ -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
@@ -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()
|
||||
Reference in new issue
Block a user