diff --git a/.gitignore b/.gitignore index 1d93084..fadb128 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 7a07742..8bbb9f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: diff --git a/models/__pycache__/__init__.cpython-36.pyc b/models/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index 88307b0..0000000 Binary files a/models/__pycache__/__init__.cpython-36.pyc and /dev/null differ diff --git a/models/__pycache__/poll.cpython-36.pyc b/models/__pycache__/poll.cpython-36.pyc deleted file mode 100644 index a82c806..0000000 Binary files a/models/__pycache__/poll.cpython-36.pyc and /dev/null differ diff --git a/secrets.py b/secrets.py new file mode 100644 index 0000000..869db05 --- /dev/null +++ b/secrets.py @@ -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() \ No newline at end of file