first commit

This commit is contained in:
Xander 2024-12-16 18:09:35 +02:00
commit 104b7795ee
5 changed files with 70 additions and 0 deletions

30
.gitignore vendored Normal file
View File

@ -0,0 +1,30 @@
# Byte-compiled files
__pycache__/
*.py[cod]
# Environment variables
.env
# Virtual environments
venv/
*.venv
# Docker
*.log
*.pid
*.bak
*.swp
.dockerignore
docker-compose.override.yml
# Python package files
*.egg
*.egg-info/
dist/
build/
*.pyc
# IDE/Editor files
.vscode/
.idea/
*.iml

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
# Use the official Python image with a specific version
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Copy requirements and install them (if there were any)
COPY requirements.txt /app/
RUN pip install -r requirements.txt
# Copy the rest of the application code
COPY . /app
# Expose the port the app runs on
EXPOSE 5000
# Command to run the application
CMD ["python", "app.py"]

10
app.py Normal file
View File

@ -0,0 +1,10 @@
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, World!'
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)

11
docker-compose.yml Normal file
View File

@ -0,0 +1,11 @@
version: '3.8'
services:
flask-app:
build:
context: .
ports:
- "5000:5000"
volumes:
- .:/app
command: python app.py

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
flask==2.3.3