Skip to content

A simple Flask app containerized with Docker for easy deployment and showcasing basic Flask functionality.

Notifications You must be signed in to change notification settings

donbigi/python-flask-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Application Dockerization

This repository contains a simple Python Flask application that can be containerized using Docker, showcasing basic Flask functionality and pushes the Docker image to a Docker registry. The workflow is triggered on push to the main branch and also runs every Saturday at 7 PM.

Prerequisites

Before running the application, ensure you have the following installed:

Getting Started

To run the Flask application locally:

  1. Clone this repository to your local machine.
  2. Open a terminal or command prompt and navigate to the project directory.

Building the Docker Image

To build the Docker image, use the following command:

docker build -t flask-app .

Running the Docker Container

To run the Docker container, execute the following command:

docker run -p 8080:5000 flask-app

The Flask application is accessible at http://localhost:8080 in your web browser.

Continuous Integration (CI)

This repository also includes a CI workflow set up with GitHub Actions. The CI workflow performs the following tasks:

  • Builds the Docker image.
  • Pushes the Docker image to a Docker registry.

The workflow is triggered on push to the main branch and also runs every Saturday at 7 PM. set the cron using: Cron Expression Generator

To configure the CI workflow for your own project, make sure you have the following secrets set in your GitHub repository:

  • DOCKER_USERNAME: Your Docker registry username.
  • DOCKER_PASSWORD: Your Docker registry password.

You can modify the workflow configuration in the .github/workflows/build.yml file to suit your needs.

Enjoy

About

A simple Flask app containerized with Docker for easy deployment and showcasing basic Flask functionality.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published