A single-page web app for tracking exercises during workouts.
- Click exercises to highlight them during your workout
- Add and remove exercises
- Exercises stored in a flat JSON file
- Selection state resets on page refresh (not persisted)
-
Install dependencies:
npm install
-
Start the server:
npm start
-
Open your browser to
http://localhost:3000
-
Build and run:
docker-compose up -d
-
Access at
http://localhost:3000 -
Your exercises will be stored in
./data/exercises.json
-
Build the image:
docker build -t exercise-tracker . -
Run the container with a volume mount:
docker run -d \ -p 3000:3000 \ -v $(pwd)/data:/data \ -e EXERCISES_FILE=/data/exercises.json \ --name exercise-tracker \ exercise-tracker
You can specify a custom location for the exercises.json file using the EXERCISES_FILE environment variable:
docker run -d \
-p 3000:3000 \
-v /path/to/your/data:/custom/data \
-e EXERCISES_FILE=/custom/data/exercises.json \
--name exercise-tracker \
exercise-trackerPORT- Server port (default: 3000)EXERCISES_FILE- Path to exercises.json file (default:/data/exercises.jsonin Docker,./exercises.jsonlocally)DEBUG- Enable debug logging (set totrueto enable, default: disabled)NODE_ENV- Node environment (default:development)
The application includes comprehensive logging for better visibility in Docker logs:
- INFO: General information about server operations, API requests, and successful operations
- WARN: Warning messages for validation failures or non-critical issues
- ERROR: Error messages with stack traces for debugging
- DEBUG: Detailed debug information (enabled with
DEBUG=true)
All logs include ISO timestamps and are formatted for easy reading in Docker logs. View logs with:
docker logs exercise-trackerOr follow logs in real-time:
docker logs -f exercise-tracker