- Add test environment to __init__.py for all eveai services

- Add postgresql certificate to secrets for secure communication in staging and production environments
- Adapt for TLS communication with PostgreSQL
- Adapt tasks to handle invalid connections from the connection pool
- Migrate to psycopg3 for connection to PostgreSQL
This commit is contained in:
Josako
2025-09-10 11:40:38 +02:00
parent 6fbaff45a8
commit 6ccba7d1e3
15 changed files with 116 additions and 11 deletions

View File

@@ -26,6 +26,8 @@ def create_app(config_file=None):
match environment:
case 'development':
app.config.from_object(get_config('dev'))
case 'test':
app.config.from_object(get_config('test'))
case 'staging':
app.config.from_object(get_config('staging'))
case 'production':

13
eveai_ops/healthz.py Normal file
View File

@@ -0,0 +1,13 @@
from flask import Blueprint, jsonify
healthz_bp = Blueprint('ops_healthz', __name__)
@healthz_bp.route('/healthz/live', methods=['GET'])
def live():
# Minimal liveness: process is running
return jsonify(status='ok'), 200
@healthz_bp.route('/healthz/ready', methods=['GET'])
def ready():
# Minimal readiness for now (no external checks)
return jsonify(status='ready'), 200