mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Use logging again
This commit is contained in:
parent
df0e677198
commit
f32f3c7fa6
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,4 +1,9 @@
|
|||||||
|
# Files
|
||||||
db.env
|
db.env
|
||||||
web.env
|
web.env
|
||||||
__pycache__
|
|
||||||
|
|
||||||
|
# Directories
|
||||||
logs
|
logs
|
||||||
|
migrations
|
||||||
|
__pycache__
|
||||||
|
@ -36,7 +36,6 @@ class DevelopmentConfig(Config):
|
|||||||
os.environ.get('POSTGRES_PASSWORD'),
|
os.environ.get('POSTGRES_PASSWORD'),
|
||||||
os.environ.get('POSTGRES_DB_NAME')
|
os.environ.get('POSTGRES_DB_NAME')
|
||||||
)
|
)
|
||||||
'''
|
|
||||||
if not os.path.isfile('logs/opaque_web.log'):
|
if not os.path.isfile('logs/opaque_web.log'):
|
||||||
file_path = os.path.join(os.getcwd(), 'logs/opaque_web.log')
|
file_path = os.path.join(os.getcwd(), 'logs/opaque_web.log')
|
||||||
log = open(file_path, 'w+')
|
log = open(file_path, 'w+')
|
||||||
@ -50,7 +49,6 @@ class DevelopmentConfig(Config):
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
logger.warning('Logging has started with level WARNING.'
|
logger.warning('Logging has started with level WARNING.'
|
||||||
' From development config.')
|
' From development config.')
|
||||||
'''
|
|
||||||
|
|
||||||
|
|
||||||
class TestingConfig(Config):
|
class TestingConfig(Config):
|
||||||
@ -71,7 +69,6 @@ class ProductionConfig(Config):
|
|||||||
os.environ.get('POSTGRES_PASSWORD'),
|
os.environ.get('POSTGRES_PASSWORD'),
|
||||||
os.environ.get('POSTGRES_DB_NAME')
|
os.environ.get('POSTGRES_DB_NAME')
|
||||||
)
|
)
|
||||||
'''
|
|
||||||
if not os.path.isfile('logs/opaque_web.log'):
|
if not os.path.isfile('logs/opaque_web.log'):
|
||||||
file_path = os.path.join(os.getcwd(), 'logs/opaque_web.log')
|
file_path = os.path.join(os.getcwd(), 'logs/opaque_web.log')
|
||||||
log = open(file_path, 'w+')
|
log = open(file_path, 'w+')
|
||||||
@ -85,7 +82,6 @@ class ProductionConfig(Config):
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
logger.error('Logging has started with level ERROR.'
|
logger.error('Logging has started with level ERROR.'
|
||||||
' From production config.')
|
' From production config.')
|
||||||
'''
|
|
||||||
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
@ -20,7 +20,6 @@ services:
|
|||||||
- ./app:/home/opaque/app
|
- ./app:/home/opaque/app
|
||||||
- ./config.py:/home/opaque/config.py
|
- ./config.py:/home/opaque/config.py
|
||||||
- ./logs:/home/opaque/logs
|
- ./logs:/home/opaque/logs
|
||||||
- ./migrations:/home/opaque/migrations
|
|
||||||
- ./opaque.py:/home/opaque/opaque.py
|
- ./opaque.py:/home/opaque/opaque.py
|
||||||
daemon:
|
daemon:
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -35,8 +34,8 @@ services:
|
|||||||
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest
|
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest
|
||||||
volumes:
|
volumes:
|
||||||
- ./logs:/home/opaque_daemon/logs
|
- ./logs:/home/opaque_daemon/logs
|
||||||
|
- ../opaque_daemon/opaque_daemon.py:/home/opaque_daemon/opaque_daemon.py
|
||||||
- $HOME/.docker/config.json:/home/opaque_daemon/.docker/config.json
|
- $HOME/.docker/config.json:/home/opaque_daemon/.docker/config.json
|
||||||
- /home/stephan/Repos/own/opaque_daemon/opaque_daemon.py:/home/opaque_daemon/opaque_daemon.py
|
|
||||||
db:
|
db:
|
||||||
deploy:
|
deploy:
|
||||||
placement:
|
placement:
|
||||||
|
Loading…
Reference in New Issue
Block a user