fix services
This commit is contained in:
@@ -8,6 +8,8 @@ import logging
|
||||
from cryptography.fernet import Fernet
|
||||
from waitress import serve
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
# Configurazione
|
||||
hash_file = "data/master_hash.txt"
|
||||
|
||||
@@ -21,10 +23,9 @@ DB_CONFIG = {
|
||||
"host": os.getenv("DB_HOST"),
|
||||
"port": os.getenv("DB_PORT")
|
||||
}
|
||||
app = Flask(__name__)
|
||||
|
||||
# Configura il logging
|
||||
logging.basicConfig(level=logging.INFO, format='%(asctime)s - PID: %(process)d %(levelname)s - %(message)s')
|
||||
logging.basicConfig(level=logging.INFO, format='- PID: %(process)d %(levelname)s - %(message)s')
|
||||
|
||||
def get_db_connection():
|
||||
return psycopg2.connect(
|
||||
@@ -218,5 +219,4 @@ def list_sites_api():
|
||||
# Avvio dell'app
|
||||
if __name__ == '__main__':
|
||||
init_db()
|
||||
#app.run(host='0.0.0.0', port=5000)
|
||||
serve(app, host='0.0.0.0', port=5000)
|
||||
|
||||
Reference in New Issue
Block a user