updated behaviour/mount of secrets.py
This commit is contained in:
parent
04faed2f07
commit
c54a656390
10
.gitignore
vendored
10
.gitignore
vendored
@ -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
secrets.py
Normal file
10
secrets.py
Normal 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()
|
||||
Loading…
Reference in New Issue
Block a user