Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Base image
FROM python:3.10-slim

# Set working directory inside the container
WORKDIR /app

# Copy dependency file first for better caching
COPY requirements.txt .

# Install dependencies (use no-cache to keep image light)
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the project files
COPY . .

# Expose port 5000 for Flask app
EXPOSE 5000

# Default command to run app.py
CMD ["python", "app.py"]
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,16 @@ contact [[email protected]](mailto:[email protected]) with any additio

Copyright © Microsoft Corporation All rights reserved.<br />
Licensed under the MIT License. See LICENSE in the project root for license information.


## update that i have done as my contribution to kalvium X mathesar

## 🐳 Running This Project with Docker

You can run this project easily inside Docker.

### Build and Run

```bash
docker build -t vscode-flask-app .
docker run -it -p 5000:5000 vscode-flask-app
5 changes: 4 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
#-----------------------------------------------------------------------------------------

from flask import Flask
app = Flask(__name__)
app = Flask(__name__, static_folder='static', static_url_path='')

@app.route("/")
def hello():
return app.send_static_file("index.html")

if __name__ == "__main__":
app.run(host='0.0.0.0', port=5000, debug=True)