entire app update:
Some checks failed
Build and Deploy Flask App / test (pull_request) Has been cancelled
Build and Deploy Flask App / build-and-push (pull_request) Has been cancelled
Build and Deploy Flask App / deploy (pull_request) Has been cancelled

moder view app with static page, forgejo ci/cd workflow
This commit is contained in:
Norvicdev 2026-08-04 17:29:48 +03:00
parent 25c896f809
commit e6e700c2ee
13 changed files with 460 additions and 28 deletions

27
app/routes.py Normal file
View file

@ -0,0 +1,27 @@
from flask import Blueprint, render_template, jsonify
import os
import datetime
main = Blueprint('main', __name__)
@main.route('/')
def index():
return render_template('index.html',
title='Flask CI/CD Demo',
version=os.environ.get('APP_VERSION', '1.0.0'))
@main.route('/health')
def health():
return jsonify({
'status': 'healthy',
'timestamp': datetime.datetime.now().isoformat(),
'environment': os.environ.get('FLASK_ENV', 'production')
})
@main.route('/api/info')
def info():
return jsonify({
'app': 'Flask CI/CD Demo',
'version': os.environ.get('APP_VERSION', '1.0.0'),
'commit': os.environ.get('COMMIT_HASH', 'unknown')
})