modified: Dockerfile
modified: README.md modified: app.py
This commit is contained in:
13
app.py
13
app.py
@@ -1,4 +1,5 @@
|
||||
from flask import Flask, render_template
|
||||
import os
|
||||
from flask import Flask, render_template, jsonify
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@@ -229,6 +230,11 @@ def contact():
|
||||
]
|
||||
return render_template('contact.html', links=contact_links)
|
||||
|
||||
# Healthcheck endpoint for platforms like Coolify
|
||||
@app.route('/health')
|
||||
def health():
|
||||
return jsonify(status='ok'), 200
|
||||
|
||||
# Project detail pages
|
||||
@app.route('/projects/fly-plugin')
|
||||
def fly_plugin():
|
||||
@@ -436,4 +442,7 @@ def discord_bot_stable_diffusion_amd():
|
||||
return render_template('project_detail.html', project=project)
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True, host='0.0.0.0', port=5000)
|
||||
# Allow overriding via environment (e.g., Coolify sets PORT)
|
||||
port = int(os.getenv('PORT', '5000'))
|
||||
debug = os.getenv('FLASK_DEBUG', 'false').lower() == 'true'
|
||||
app.run(debug=debug, host='0.0.0.0', port=port)
|
||||
Reference in New Issue
Block a user