Self-host SparkyFitness with Docker
A fitness tracker for nutrition, exercise, and body measurements.
This page describes the Levelrail template for SparkyFitness (Productivity). It deploys the services below as one Docker Compose app on your own server.
Project site: https://codewithcj.github.io/SparkyFitness/.Recommended memory: about 512 MiB.
Services, ports and volumes
| Service | Image | Container ports | Volumes |
|---|---|---|---|
postgres | postgres:16-alpine | none | postgres_data -> /var/lib/postgresql/data |
sparkyfitness-frontend | codewithcj/sparkyfitness:v1.6.1 | 80 | none |
sparkyfitness-server | codewithcj/sparkyfitness_server:v1.6.1 | none | none |
Environment variables
| Service | Variable | Value |
|---|---|---|
postgres | POSTGRES_DB | Preset in the template |
postgres | POSTGRES_PASSWORD | Generated at deploy |
postgres | POSTGRES_USER | Preset in the template |
sparkyfitness-frontend | SPARKY_FITNESS_SERVER_HOST | Preset in the template |
sparkyfitness-frontend | SPARKY_FITNESS_SERVER_PORT | Preset in the template |
sparkyfitness-server | BETTER_AUTH_SECRET | Generated at deploy |
sparkyfitness-server | NODE_ENV | Preset in the template |
sparkyfitness-server | SPARKY_FITNESS_API_ENCRYPTION_KEY | Generated at deploy |
sparkyfitness-server | SPARKY_FITNESS_APP_DB_PASSWORD | Generated at deploy |
sparkyfitness-server | SPARKY_FITNESS_APP_DB_USER | Preset in the template |
sparkyfitness-server | SPARKY_FITNESS_DB_HOST | Preset in the template |
sparkyfitness-server | SPARKY_FITNESS_DB_NAME | Preset in the template |
sparkyfitness-server | SPARKY_FITNESS_DB_PASSWORD | Generated at deploy |
sparkyfitness-server | SPARKY_FITNESS_DB_PORT | Preset in the template |
sparkyfitness-server | SPARKY_FITNESS_DB_USER | Preset in the template |
sparkyfitness-server | SPARKY_FITNESS_LOG_LEVEL | Preset in the template |
sparkyfitness-server | TZ | Preset in the template |
Passwords and keys marked as generated are created for you when the app is deployed and stored as secrets. Values are not shown here.
Deploy SparkyFitness with Levelrail
In the dashboard, open Apps, choose New app, then Browse templates, and select SparkyFitness. Review the Compose body and deploy.
With the CLI:
levelrail-cli templates deploy sparkyfitness --name my-sparkyfitnessSee Service template catalog for how templates work, and Getting started if you have not installed Levelrail yet.
More Productivity templates
All templates are listed in the self-host gallery.