Skip to content

πŸ‹οΈA simple and self-hostable workout tracking web app build with Flask, SQLite, and Docker.

Notifications You must be signed in to change notification settings

peterlang-p/workout-tracker

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‹οΈβ€β™‚οΈ Workout Tracker

A simple and self-hostable workout tracking web app built with Flask, SQLite, and Docker.

πŸ“Ί Demo

image

πŸš€ Features

  • βœ… Log daily workouts by category and exercise type
  • πŸ“Š Track performance and progress over time
  • πŸ‘₯ Admin user management with authentication
  • πŸ’Ύ Uses SQLite β€” zero setup, file-based database
  • 🐳 Containerised with Docker for effortless deployment
  • βš™οΈ Environment-variable-driven configuration
  • πŸ›‘οΈ Passwords hashed with werkzeug.security

πŸ“¦ Tech Stack

  • Backend: Python 3.11, Flask, SQLAlchemy, Flask-Migrate
  • Database: SQLite (customisable)
  • Server: Waitress (production-ready WSGI server)
  • Packaging: Docker & Docker Compose

πŸ§ͺ Local Development

πŸ”§ Requirements

  • Python 3.11+
  • pip
  • Optional: virtualenv
git clone https://github.com/enrique-paulino/workout-tracker.git
cd workout-tracker
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

🧠 Initialisation

python -m app.init_app
python run.py

Open http://localhost:5000 in your browser. Default admin credentials are:

  • Username: admin
  • Password: adminpass123

You can customise these via environment variables.


🐳 Docker Deployment

The image for this project can be found on Docker.

⚑ Quick Start

docker build -t workout-tracker .
docker run -d -p 5000:5000 \
  -e PORT=5000 \
  -e SQLITE_DB_PATH=sqlite:////app/app.db \
  -v $(pwd)/app.db:/app/app.db \
  workout-tracker

🧰 Docker Compose (recommended)

Create the file first at ./app.db so that docker doesn't assume its a directory.

version: '3.8'
services:
  workout-tracker:
    image: ennoluto/workout-tracker:latest
    container_name: workout-tracker
    ports:
      - "5000:5000"  # host:container (change host port if you want, e.g. "272:5000")
    environment:
      - PORT=5000
      - SQLITE_DB_PATH=sqlite:////app/app.db
    volumes:
      - ./app.db:/app/app.db

Start with: docker-compose up -d

βš™οΈ Configuration

The application uses environment variables for configuration. Below are the supported options:

Environment Variable Description Default
PORT Port the app listens on 5000
SQLITE_DB_PATH SQLAlchemy DB URI sqlite:///app.db
ADMIN_USERNAME Admin account username admin
ADMIN_EMAIL Admin email admin@example.com
ADMIN_PASSWORD Admin password (hashed internally) adminpass123

πŸ›‘οΈ License

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Author

Made with πŸ’ͺ by @enrique-paulino

Contributions, issues and feedback welcome!

About

πŸ‹οΈA simple and self-hostable workout tracking web app build with Flask, SQLite, and Docker.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 60.9%
  • Python 37.9%
  • Other 1.2%