cnc-service/src/config.py
Torma Kristóf 446cb6f611
Some checks reported errors
continuous-integration/drone/push Build was killed
add psycopg2
2020-08-06 20:33:06 +02:00

35 lines
1.1 KiB
Python

#!/usr/bin/env python3
import os
"""
Configuration variables
"""
__author__ = "@tormakris"
__copyright__ = "Copyright 2020, Birbnetes Team"
__module_name__ = "config"
__version__text__ = "1"
PORT = os.environ.get("CNC_SERVICE_PORT", 8080)
DEBUG = os.environ.get("CNC_SERVICE_DEBUG", True)
SENTRY_DSN = os.environ.get("SENTRY_DSN")
RELEASE_ID = os.environ.get("RELEASE_ID", "test")
RELEASEMODE = os.environ.get("CNC_SERVICE_RELEASEMODE", "dev")
POSTGRES_HOSTNAME = os.getenv("CNC_POSTGRES_HOSTNAME", "localhost")
POSTGRES_USERNAME = os.getenv("CNC_POSTGRES_USERNAME", "cnc-service")
POSTGRES_PASSWORD = os.getenv("CNC_POSTGRES_PASSWORD", "cnc-service")
POSTGRES_DB = os.getenv("CNC_POSTGRES_DB", "cnc-service")
MQTT_HOSTNAME = os.getenv("CNC_MQTT_HOSTNAME", "localhost")
MQTT_PORT = os.getenv("CNC_MQTT_PORT", "1883")
MQTT_USERNAME = os.getenv("CNC_MQTT_USERNAME", "cnc-service")
MQTT_PASSWORD = os.getenv("CNC_MQTT_PASSWORD", "cnc-service")
MQTT_STATUS_TOPIC = os.getenv("CNC_MQTT_STATUS_TOPIC", "cnc-service")
MQTT_COMMAND_TOPIC = os.getenv("CNC_MQTT_COMMAND_TOPIC", "cnc-service")