Skip to content

Latest commit

 

History

History
105 lines (72 loc) · 2.28 KB

README.md

File metadata and controls

105 lines (72 loc) · 2.28 KB

alt text

Note

The application, documentation and logo were created with ChatGPT (Log).

Daily Workout

It is a web application that displays a new AI-generated workout every day.

Demo

Project Overview

This Nodes.js application displays a daily Crossfit workout on a webpage. The page shows the workout in a table in the center. The workouts are generated once daily and stored in a JSON file.

Table of Contents

Installation

Prerequisites

  • Node.js
  • Docker
  • Kubernetes (e.g., Minikube)
  • Git

Steps

  1. Clone the repository:

    git clone https://github.com/gerrited/daily-workout.git
    cd daily-workout
  2. Install dependencies:

    npm install

Usage

Running the Application Locally

  1. Start the application:

    node app.js
  2. Open a browser and navigate to http://localhost:3000.

Docker Support

Building and Running the Docker Container

  1. Build the Docker image:

    docker build -t crossfit-workout:latest .
  2. Run the Docker container:

    docker run -p 3000:3000 crossfit-workout:latest

Kubernetes Deployment

Creating Persistent Volumes and Deployments

  1. Apply the Kubernetes resources:
    kubectl apply -f k8s/pv.yaml
    kubectl apply -f k8s/frontend.yaml
    kubectl apply -f k8s/workout-generator.yaml

Checking the Deployment

  1. Check the status of deployments and services:
    kubectl get deployments
    kubectl get services

GitHub Actions Workflow

The GitHub Actions workflow builds and pushes the Docker image to the GitHub Container Registry (GHCR) automatically.

Workflow File

.github/workflows/frontend.yml .github/workflows/workout-generator.yml

Styles

src/frontend/public/styles.css

Contributions

Contributions are welcome! Please create a pull request or file an issue in the issue tracker.