Skip to content
프로젝트

mmumshad/simple-webapp-flask

GitHub에서 보기

소개

Simple Flask based web application

학습 및 교육

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Simple Web Application

A minimal Python Flask web application used as the demo app in the KodeKloud Docker for Beginners course.

The app exposes two routes:

Route Response
/ Welcome!
/how-are-you I am good, how about you?

Run manually (without Docker)

These steps assume a fresh machine.

  1. Select an OS - Ubuntu

  2. Update the package index:

    sudo apt-get update
    
  3. Install Flask (this also pulls in Python 3):

    sudo apt-get install -y python3-flask
    
  4. Set the Flask app environment variable:

    export FLASK_APP=app.py
    
  5. Start the application:

    flask run --host=0.0.0.0
    

Then open http://localhost:5000 and http://localhost:5000/how-are-you in a browser.

Run with Docker

git clone https://github.com/mmumshad/simple-webapp-flask.git
cd simple-webapp-flask
docker build -t simple-webapp-flask .
docker run -p 5000:5000 simple-webapp-flask

Then open http://localhost:5000 and http://localhost:5000/how-are-you in a browser.

The Dockerfile

FROM ubuntu

RUN apt-get update
RUN apt-get install -y python3-flask

COPY app.py /opt/app.py

ENV FLASK_APP=/opt/app.py

ENTRYPOINT ["flask", "run", "--host=0.0.0.0"]

Each instruction mirrors one of the manual steps above — making it easy to see how a Dockerfile is just an automated install script.

관련 프로젝트 살펴보기

불러오는 중…