Initial commit

This commit is contained in:
Gašper Dobrovoljc
2025-11-12 13:09:01 +01:00
commit 0666924962
7 changed files with 119 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
FROM python:alpine
RUN pip install flask
COPY ./app.py ./app.py
CMD ["python", "app.py"]

View File

@@ -0,0 +1,24 @@
from flask import Flask
import logging
logging.basicConfig(level=logging.INFO)
app = Flask(__name__)
logger = logging.getLogger('burek')
@app.route('/')
def home():
logger.info("Home endpoint accessed")
return "Hello World"
@app.route('/data', methods=['POST'])
def data():
logger.info("Data endpoint accessed with data: %s", request.json)
return {
"message": "Data received successfully",
"data": request.json
}
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8000)

View File

@@ -0,0 +1,12 @@
services:
app:
image: app
build: .
ports:
- "8000:8000"
logging:
driver: "fluentd"
options:
fluentd-address: localhost:24224
tag: jufka