Add the ability to toggle debug in docker
This commit is contained in:
parent
cb6249d31c
commit
1d348b5b70
2 changed files with 7 additions and 1 deletions
|
@ -10,6 +10,8 @@ RUN \
|
||||||
/config \
|
/config \
|
||||||
/app
|
/app
|
||||||
|
|
||||||
|
ENV DEBUG="False"
|
||||||
|
|
||||||
CMD cp /app/data/varken.example.ini /config/varken.example.ini && python3 /app/Varken.py --data-folder /config
|
CMD cp /app/data/varken.example.ini /config/varken.example.ini && python3 /app/Varken.py --data-folder /config
|
||||||
|
|
||||||
VOLUME /config
|
VOLUME /config
|
|
@ -8,6 +8,7 @@ import schedule
|
||||||
import threading
|
import threading
|
||||||
import platform
|
import platform
|
||||||
import distro
|
import distro
|
||||||
|
import os
|
||||||
|
|
||||||
from sys import exit
|
from sys import exit
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
@ -54,6 +55,9 @@ if __name__ == "__main__":
|
||||||
else:
|
else:
|
||||||
exit("{} does not exist".format(ARG_FOLDER))
|
exit("{} does not exist".format(ARG_FOLDER))
|
||||||
|
|
||||||
|
if os.getenv('DEBUG', False) == 'True':
|
||||||
|
opts.debug = True
|
||||||
|
|
||||||
# Initiate the logger
|
# Initiate the logger
|
||||||
vl = VarkenLogger(data_folder=DATA_FOLDER, debug=opts.debug)
|
vl = VarkenLogger(data_folder=DATA_FOLDER, debug=opts.debug)
|
||||||
vl.logger.info('Starting Varken...')
|
vl.logger.info('Starting Varken...')
|
||||||
|
|
Loading…
Reference in a new issue