Added Docker and Removed Socket Integration
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
"""
|
||||
Controller for health check endpoint.
|
||||
"""
|
||||
from flask import Blueprint, jsonify
|
||||
from flask.typing import ResponseReturnValue
|
||||
import logging
|
||||
|
||||
# Configure logger
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Create blueprint
|
||||
health_bp = Blueprint('health', __name__)
|
||||
|
||||
|
||||
@health_bp.route('/health', methods=['GET'])
|
||||
def health_check() -> ResponseReturnValue:
|
||||
"""
|
||||
Endpoint to check API health.
|
||||
|
||||
This endpoint is used by Docker healthcheck and monitoring systems.
|
||||
|
||||
Returns:
|
||||
JSON response with health status
|
||||
"""
|
||||
return jsonify({
|
||||
"status": "healthy",
|
||||
"version": "1.0.0"
|
||||
})
|
||||
@@ -29,6 +29,7 @@ def register_blueprints(app: Flask) -> None:
|
||||
from api.controllers.token import token_bp
|
||||
from api.controllers.lien import lien_bp
|
||||
from api.controllers.sms import sms_bp
|
||||
from api.controllers.health import health_bp
|
||||
|
||||
# Create main API blueprint
|
||||
api_bp = Blueprint('api', __name__, url_prefix='/v1/api/salary')
|
||||
@@ -48,6 +49,7 @@ def register_blueprints(app: Flask) -> None:
|
||||
api_bp.register_blueprint(token_bp)
|
||||
api_bp.register_blueprint(lien_bp)
|
||||
api_bp.register_blueprint(sms_bp)
|
||||
api_bp.register_blueprint(health_bp)
|
||||
|
||||
# Register main blueprint with app
|
||||
app.register_blueprint(api_bp)
|
||||
|
||||
Reference in New Issue
Block a user