Sign inSign up

ajmalrasouli/profile-app

By ajmalrasouli

•Updated over 2 years ago

A Dockerized Flask app displaying a user profile with CI/CD pipeline using GitHub Actions.

Image
Integration & delivery
Developer tools
0

248

ajmalrasouli/profile-app repository overview

⁠Profile Application

This repository contains a Dockerized Flask application that displays a user profile. It includes a CI/CD pipeline using GitHub Actions to automate the build and deployment process to Docker Hub.

⁠Description

The Profile Application is a demo project built with Flask. It demonstrates a basic user profile page with static content and is designed to showcase Dockerization and CI/CD practices.

⁠Features

  • Simple Flask web application
  • Dockerized for containerized deployment
  • Automated CI/CD pipeline with GitHub Actions

⁠How to Run

To run this Dockerized Flask application, follow the steps below:

⁠Prerequisites
  • Docker installed on your machine
  • Docker Hub account
⁠Steps
  1. Pull the Docker image:

    docker pull ajmalrasouli/profile-app:latest
    
  2. Run the Docker container:

    docker run -d -p 5000:5000 ajmalrasouli/profile-app:latest
    

    This will start the Flask application and bind it to port 5000. You can access it at http://localhost:5000.

⁠GitHub Actions CI/CD

This repository uses GitHub Actions for continuous integration and deployment. The workflow is triggered on every push to the main branch and performs the following steps:

  1. Checkout repository: Checks out the code from GitHub.
  2. Set up Docker Buildx: Sets up Docker Buildx for multi-platform builds.
  3. Login to Docker Hub: Authenticates to Docker Hub using stored secrets.
  4. Build and push Docker image: Builds the Docker image and pushes it to Docker Hub.
  5. Log out from Docker Hub: Logs out from Docker Hub.

⁠Repository Structure

/project-directory
    /static
        image.png
        profile.jpg
        styles.css
    /templates
        index.html
    .github
        /workflows
            deploy-to-dockerhub.yml
    app.py
    Dockerfile
    requirements.txt
    README.md

Tag summary

Content type

Image

Digest

sha256:538203843…

Size

49.7 MB

Last updated

over 2 years ago

docker pull ajmalrasouli/profile-app