Overview
The Hub platform uses environment variables for configuration management. This guide covers all required and optional environment variables for running the application.All environment variables should be defined in your
.env file or in your deployment environment.Database Configuration
PostgreSQL database host addressDefault:
localhostExample: postgres (for Docker), db.example.com (for production)PostgreSQL database portDefault:
5432Database name for the Hub applicationExample:
hub_db, padelhub_prodDatabase username with read/write permissionsExample:
hub_userDatabase user password
PostgreSQL SSL mode configurationDefault:
disableOptions: disable, require, verify-ca, verify-fullUse
require or higher for production environmentsAuthentication (Auth0)
Auth0 issuer URI for JWT token validationFormat:
https://YOUR_DOMAIN.auth0.com/Example: https://padelhub.eu.auth0.com/Auth0 API audience identifierExample:
https://api.padelhub.comThis value must match the audience configured in your Auth0 API settings.Media Storage (Cloudinary)
Your Cloudinary cloud nameExample:
padelhub-mediaCloudinary API key for authentication
Cloudinary API secret
Email Service (Brevo)
Brevo (formerly Sendinblue) API key for transactional emailsDefault:
dummy-key-for-local (development only)For local development, the default dummy key will log emails without sending them
Application Configuration
Frontend application URL for CORS and email linksDefault:
http://localhost:3000Production Example: https://app.padelhub.comSender email address for transactional emailsDefault:
noreply@padelhub.comExample: support@padelhub.comPort mapping for the backend service (Docker)Default:
8080Enable/disable Swagger UI and OpenAPI documentationDefault:
truePostgreSQL Container Configuration
Initial database name (Docker only)This creates the database when the PostgreSQL container first starts.
PostgreSQL superuser name (Docker only)
PostgreSQL superuser password (Docker only)
Example Configuration
Security Best Practices
Never commit secrets
Add
.env to your .gitignore file. Use .env.example with placeholder values for documentation.Use environment-specific files
Maintain separate configuration for development, staging, and production environments.
Use secrets management
For production, use AWS Secrets Manager, HashiCorp Vault, or your cloud provider’s secrets service.
Validation
The application validates required environment variables at startup. Missing or invalid variables will prevent the application from starting with clear error messages.Use the health check endpoint
/actuator/health to verify the application is running correctly with your configuration.Next Steps
Authentication
Configure Auth0 authentication
Database Setup
Set up PostgreSQL with PostGIS
Integrations
Configure third-party services
Deployment
Deploy with Docker