sparkyfitness

This commit is contained in:
Sönke Domröse
2025-07-14 16:20:33 +02:00
parent 099b7357c1
commit 435d928f55
4 changed files with 135 additions and 0 deletions

59
sparkyfitness/.env Normal file
View File

@@ -0,0 +1,59 @@
# SparkyFitness Environment Variables
# Copy this file to .env in the root directory and fill in your own values before running 'docker-compose up'.
# --- PostgreSQL Database Settings ---
# These values should match the ones used by your PostgreSQL container.
# For Docker Compose deployments, SPARKY_FITNESS_DB_HOST will be the service name (e.g., 'sparkyfitness-db').
# For local development (running Node.js directly), use 'localhost' or '127.0.0.1' if PostgreSQL is on your host.
SPARKY_FITNESS_DB_NAME=sparkyfitness_db
SPARKY_FITNESS_DB_USER=sparky
SPARKY_FITNESS_DB_PASSWORD=iI5EjjLHHPhYAsiw1H1eAUz6kfkTxLp6T3Zv4H0JSmi4Dt1rGCR2904lURub7ctB
#SPARKY_FITNESS_DB_HOST=localhost # Needed only for local development or if you are not using Docker Compose.
# --- Backend Server Settings ---
# The hostname or IP address of the backend server.
# For Docker Compose, this is typically the service name (e.g., 'sparkyfitness-server').
# For local development or other deployments, this might be 'localhost' or a specific IP.
SPARKY_FITNESS_SERVER_HOST=sparkyfitness-server
# The external port the server will be exposed on.
SPARKY_FITNESS_SERVER_PORT=3010
# The public URL of your frontend (e.g., https://fitness.example.com). This is crucial for CORS security.
# For local development, use http://localhost:8080. For production, use your domain with https.
SPARKY_FITNESS_FRONTEND_URL=https://sparkyfitness.domr.ovh
# Logging level for the server (e.g., INFO, DEBUG, WARN, ERROR)
SPARKY_FITNESS_LOG_LEVEL=INFO
# Node.js environment mode (e.g., development, production, test)
# Set to 'production' for deployment to ensure optimal performance and security.
NODE_ENV=production
# Server timezone. Use a TZ database name (e.g., 'America/New_York', 'Etc/UTC').
# This affects how dates/times are handled by the server if not explicitly managed in code.
TZ=Etc/UTC
# --- Security Settings ---
# A 64-character hex string for data encryption.
# You can generate a secure key with the following command:
# openssl rand -hex 32
# or
# node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
SPARKY_FITNESS_API_ENCRYPTION_KEY=6b81cdf06688652427c79ed4e08116c8612c87309bb7d0ed76edc586f240c81c
# A secret key for signing JSON Web Tokens (JWTs). Make this a long, random, and secure string.
# You can generate a secure key with the following command:
# openssl rand -base64 32
# or
# node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
JWT_SECRET=bvf4IpNQ9CtxdeRlcYk2K5lpQeAphPBgo72G7EQdPmE=
# --- Signup Settings ---
# Set to 'true' to disable new user registrations.
SPARKY_FITNESS_DISABLE_SIGNUP=false
# --- Admin Settings ---
# Set the email of a user to automatically grant admin privileges on server startup.
# This is useful for development or initial setup.
# Example: SPARKY_FITNESS_ADMIN_EMAIL=admin@example.com
SPARKY_FITNESS_ADMIN_EMAIL=soenke@domroese.eu