Facilitate dev and prod databases - fixes #15

This commit is contained in:
Keith Edmunds 2021-07-04 19:21:28 +01:00
parent 199dada246
commit 6936b24129
3 changed files with 6 additions and 2 deletions

View File

@ -30,9 +30,9 @@ class Config(object):
MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS') is not None
MILLISECOND_SIGFIGS = 0
MYSQL_CONNECT = "mysql+mysqldb://musicmuster:musicmuster@localhost/musicmuster"
MYSQL_CONNECT = os.environ.get('MYSQL_CONNECT') or "mysql+mysqldb://musicmuster:musicmuster@localhost/musicmuster_dev" # noqa E501
NORMALISE_ON_IMPORT = True
ROOT = "/home/kae/music"
ROOT = os.environ.get('ROOT') or "/home/kae/music"
TESTMODE = True
TIMER_MS = 500
VOLUME_VLC_DEFAULT = 81

4
run_prod.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash gdb -ex r --args /home/kae/git/musicmuster/.direnv/python-3.9.2/bin/python app/musicmuster.py
MYSQL_CONNECT="mysql+mysqldb://musicmuster:musicmuster@localhost/musicmuster_prod"
ROOT="/home/kae/music"
./app/musicmuster.py