This repository contains the necessary configuration and code to deploy an alpine-based docker application on Heroku using CI/CD pipeline. This project originally came from my GitLab but I migrated it to GitHub and converted the .gitlab.ci
to GitHub Actions.
- Prerequisites
- Docker installed on your local machine.
- The project repository cloned to your local machine.
- Building the Docker Image
- Navigate to the project directory in your terminal.
- Build the Docker image using the provided Dockerfile with the following command :
docker build -t hello-world .
- Running the Docker Container:
- Once the image is built, you can run the Docker container locally with :
docker run -p 80:5000 hello-world
- Accessing the Website
- Open a web browser and navigate to
http://localhost
. - You should see your static website running locally.
.gitlab-ci.yml
: This file contains the GitLab CI/CD pipeline configuration for building, testing, and deploying the static website..github/workflows/ci-cd.yaml
: This file contains the GitHub Actions workflow configuration for similar purposes as the GitLab CI/CD pipeline.
- Prerequisites
- A GitLab or GitHub account.
- Git installed on your local machine.
- Setting Up your GitHub|GitLab Secrets
- Pushing Changes
- The GitHub Actions workflow will handle deployment to Heroku.
- Once the job is completed, you can access the production environment to see your deployed website.