Skip to content

danijeldragicevic/flask-app-dockerized

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask App - Dockerized

This is Python web application with a single endpoint (/) exposed on port 8000. The application is containerized using the Docker.

Technology

  • Python 3.13.0
  • Flask 2.3.2
  • Docker 27.2.0

To run without Docker

  1. Create the Virtual Environment:
$ python3 -m venv venv

  1. Activate the Virtual Environment:
$ source venv/bin/activate  # on macOS and Linux

$ venv\Scripts\activate     # on Windows

  1. Install Dependencies:
$ pip install -r requirements.txt

  1. Run the Application:
$ python main.py

  1. Test the Application
$ curl http://localhost:8000/

Expected result:

{"first_name":"Hyper","id":"90","last_name":"Skill"}

To run with the Docker

  1. Navigate to the project root directory and build the Image:
$ docker build -t flask-app .

  1. Run the Docker Container:
$ docker run -d -p 8000:8000 flask-app

  1. Test the Application:
$ curl http://localhost:8000/

Expected result:

{"first_name":"Hyper","id":"90","last_name":"Skill"}

Licence

License

About

Simple Python (Flask) app. Containerized with Docker.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published