Skip to content

Commit 107d05e

Browse files
committed
feat: bootstrap basic app
0 parents  commit 107d05e

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM python:3.11-slim
2+
3+
WORKDIR /app
4+
5+
COPY requirements.txt .
6+
RUN pip install --no-cache-dir -r requirements.txt
7+
8+
COPY . .
9+
10+
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "main:app"]

main.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from flask import Flask, jsonify
2+
3+
app = Flask(__name__)
4+
5+
@app.route("/")
6+
def hello_world():
7+
return jsonify({"message": "Hello, World!"})
8+
9+
@app.route("/health")
10+
def health_check():
11+
return jsonify({"status": "healthy"})
12+
13+
if __name__ == "__main__":
14+
app.run(host="0.0.0.0", port=8080, debug=True)

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
flask==3.0.2
2+
gunicorn==21.2.0

0 commit comments

Comments
 (0)