first commit
This commit is contained in:
commit
104b7795ee
|
@ -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
|
|
@ -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"]
|
|
@ -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)
|
|
@ -0,0 +1,11 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
flask-app:
|
||||
build:
|
||||
context: .
|
||||
ports:
|
||||
- "5000:5000"
|
||||
volumes:
|
||||
- .:/app
|
||||
command: python app.py
|
|
@ -0,0 +1 @@
|
|||
flask==2.3.3
|
Loading…
Reference in New Issue