diff --git a/Dockerfile b/Dockerfile index 42afe5a..e090deb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,6 @@ WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . +COPY templates ./templates EXPOSE 5000 CMD ["python", "app.py"] diff --git a/app.py b/app.py index 643e1f9..092d05d 100644 --- a/app.py +++ b/app.py @@ -1,9 +1,12 @@ -from flask import Flask +from flask import Flask, render_template +from flask_bootstrap import Bootstrap5 # Use Bootstrap5 for modern BS5 + app = Flask(__name__) +bootstrap = Bootstrap5(app) @app.route('/') -def hello(): - return "
This is a simple Flask server for demonstration.
" +def index(): + return render_template('index.html') if __name__ == '__main__': app.run(host='0.0.0.0', port=5000) diff --git a/requirements.txt b/requirements.txt index 0647450..6100feb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ flask==3.0.3 +flask-bootstrap==0.14.0 # Latest version supporting BS5 diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..64e5951 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,92 @@ +{% extends "bootstrap/base.html" %} +{% import "bootstrap/fixes.html" as fixes %} + +{% block title %}Professional Demo Site{% endblock %} + +{% block head %} +{{ super() }} +{{ fixes.ie8() }} +{% endblock %} + +{% block styles %} +{{ super() }} + +{% endblock %} + +{% block navbar %} + +{% endblock %} + +{% block content %} +This is a realistic, Bootstrap-powered Flask application for demonstration purposes. It features responsive design and modern UI elements.
+ Learn More +Adapts seamlessly to mobile, tablet, and desktop devices.
+Uses Bootstrap 5 for clean, professional styling.
+Containerized with Docker for quick setup on any server.
+This site serves as a starting point for building more complex web applications. Extend it with databases, APIs, or user authentication as needed.
+