Portainer is a lightweight web-based GUI for managing Docker environments. If you prefer a visual interface over the command line, you can deploy SparkyFitness as a Portainer Stack — Portainer’s equivalent ofDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/CodeWithCJ/SparkyFitness/llms.txt
Use this file to discover all available pages before exploring further.
docker compose up. The stack definition is identical to the standard docker-compose.prod.yml file, so you get the same three-service topology (database, backend, frontend) managed entirely from your browser.
Prerequisites
- A running Docker environment — Docker Engine must be installed on your host.
- Portainer installed and accessible — if you haven’t set up Portainer yet, follow the official Portainer installation guide.
Deploying the Stack
Navigate to Stacks in Portainer
Log in to your Portainer instance. In the left sidebar, click Stacks, then click the Add stack button in the top-right corner.
Name and define the stack
- Enter a stack name — for example,
sparkyfitness. - Under Build method, choose one of the following options:
docker-compose.prod.yml from the latest release and upload it:Configure environment variables
Scroll down to the Environment variables section within the Portainer stack editor. Click Add environment variable for each of the following mandatory variables and supply their values:
For a complete description of every available variable, see the Environment Variables reference.
| Variable | Example value | Notes |
|---|---|---|
SPARKY_FITNESS_DB_NAME | sparkyfitness_db | PostgreSQL database name |
SPARKY_FITNESS_DB_USER | sparky | Superuser for migrations |
SPARKY_FITNESS_DB_PASSWORD | (strong password) | Do not change after first start |
SPARKY_FITNESS_APP_DB_USER | sparkyapp | Limited-privilege app user |
SPARKY_FITNESS_APP_DB_PASSWORD | (strong password) | |
SPARKY_FITNESS_FRONTEND_URL | http://your-server-ip:3004 | Must match the URL you use in your browser |
SPARKY_FITNESS_API_ENCRYPTION_KEY | (64-char hex) | Generate: openssl rand -hex 32 |
BETTER_AUTH_SECRET | (random string) | Generate: openssl rand -hex 32 |
DB_PATH | ./postgresql | Host path for database files |
SERVER_BACKUP_PATH | ./backup | Host path for backup files |
SERVER_UPLOADS_PATH | ./uploads | Host path for uploaded images |
Deploy the stack
Click the Deploy the stack button at the bottom of the page. Portainer will pull the required Docker images and start all three containers. This may take a few minutes on the first deployment depending on your network speed.You can monitor progress in the Stacks list — the stack status changes from Deploying to Running once all services are healthy.
Managing the Stack
From the Stacks view in Portainer you can:- Stop / Start the stack without deleting data.
- Update the stack — edit the Compose definition or environment variables and click Update the stack to apply changes.
- Pull and redeploy — use the Pull and redeploy button to fetch the latest Docker images and restart the containers with zero manual
docker pullcommands. - Remove the stack — removes containers and networks. Volume data on your host is preserved unless you explicitly delete the directories.