Development

Step 1: Create App

from flask import Flask
app = Flask(__name__)
  
@app.route('/')
def hello():
    return "Hell World"
  
  
if __name__ == "__main__":
    app.run(host ='0.0.0.0', port = 5001, debug = True)

name it as demo.py

click==8.0.3
Flask==2.0.2
itsdangerous==2.0.1
Jinja2==3.0.2
MarkupSafe==2.0.1
Werkzeug==2.0.2

Containerize the app

Step 2: Create Docker file

FROM python:alpine3.7
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
EXPOSE 5001
ENTRYPOINT [ "python" ]
CMD [ "demo.py" ]

Step 3: Write a compose file

version: "3.9"
services:
  web:
    build: .
    ports:
		      - "8000:5001"

Push to GitHub

Step 1: Install git for windows

How to Install Git on Windows {Step-by-Step Tutorial} - PhoenixNAP

Step 3: Add the files to staging

git add .

Step 4: Commit the changes

git commit -m "first release"

Step 5: Push changes to Github

git push -u origin main