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
|
# IDE Folders
|
||||||
pm/../.idea/
|
.idea/
|
||||||
|
|
||||||
|
.env
|
||||||
|
|
||||||
# PY VENV
|
# PY VENV
|
||||||
pm/venv/
|
pm/venv/
|
||||||
|
|
||||||
# Tokens and Passwwords
|
# Tokens and Passwwords (information will be fetched from .env)
|
||||||
pm/essentials/secrets.py
|
# secrets.py
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pm/pollmaster\.log
|
pm/pollmaster\.log
|
||||||
|
|
||||||
|
|||||||
@ -19,6 +19,8 @@ services:
|
|||||||
# App - Container, where the main application runs
|
# App - Container, where the main application runs
|
||||||
app:
|
app:
|
||||||
restart: always
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./secrets.py:/data/pm/essentials/secrets.py
|
||||||
links:
|
links:
|
||||||
- mongo
|
- mongo
|
||||||
build:
|
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