modified: Dockerfile

modified:   README.md
	modified:   app.py
This commit is contained in:
SimolZimol
2025-10-26 19:20:32 +01:00
parent 09b0b2f3b7
commit 347902d518
3 changed files with 33 additions and 4 deletions

13
app.py
View File

@@ -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)