Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/whitiue/logiMathApp/llms.txt

Use this file to discover all available pages before exploring further.

LogiMath reads its runtime configuration from environment variables, keeping credentials and deployment-specific settings out of the codebase. The repository ships with a .env.example file that lists every required variable with safe placeholder values. Copy it to .env before running the application locally.
cp .env.example .env
Never commit your .env file to version control. It contains database credentials that must stay private. The .gitignore should already exclude it — verify this before pushing.

Variables reference

Database credentials

These variables configure the PostgreSQL container and are passed to Docker Compose when starting the postgres service.
VariableExample valueDescription
POSTGRES_USERlogmath_userThe PostgreSQL role that owns the application database.
POSTGRES_PASSWORDlogmath_pass_change_me_in_productionPassword for POSTGRES_USER. Replace with a strong value before deploying.
POSTGRES_DBlogmath_dbName of the database created on first container startup.

Backend connection

VariableExample valueDescription
DATABASE_URLpostgresql://logmath_user:logmath_pass_change_me_in_production@postgres:5432/logmath_dbFull SQLAlchemy-compatible connection string. The hostname postgres resolves to the database container inside the Docker network.
API_HOST0.0.0.0The address the Uvicorn server binds to. Use 0.0.0.0 to accept connections from outside the container.
API_PORT8000The port Uvicorn listens on. Must match the port mapping in docker-compose.yml (8000:8000).

Full .env.example

The complete file from the repository, which you can use as your starting point:
.env.example
# Variables de entorno para desarrollo LOCAL

# PostgreSQL
POSTGRES_USER=logmath_user
POSTGRES_PASSWORD=logmath_pass_change_me_in_production
POSTGRES_DB=logmath_db

# Backend
DATABASE_URL=postgresql://logmath_user:logmath_pass_change_me_in_production@postgres:5432/logmath_db
API_HOST=0.0.0.0
API_PORT=8000

Important notes

The DATABASE_URL hostname is postgres, not localhost. Inside the Docker network, Docker Compose resolves the service name postgres to the database container’s IP address. If you run the backend outside Docker, change postgres to localhost and ensure PostgreSQL is accessible on port 5432.
Use a password manager or a tool like openssl rand -base64 32 to generate a strong POSTGRES_PASSWORD for any environment beyond local development.

Environment variables on Render

When deploying to Render, the DATABASE_URL is injected automatically from the managed database via the fromDatabase reference in render.yaml. You do not need to set POSTGRES_USER, POSTGRES_PASSWORD, or POSTGRES_DB manually — those are only required for Docker Compose local deployments. See Deploy to Render for details.

Build docs developers (and LLMs) love