Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JAQA20/LaComanda/llms.txt

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

La Comanda reads every piece of runtime configuration — from the database connection to email delivery — from a single .env file at the project root. This approach keeps secrets out of source code and lets you run the same Docker image in development, staging, and production simply by swapping the file. Before starting the stack for the first time, copy the provided template and fill in the required values.
cp .env.example .env
Never commit .env to version control. The repository’s .gitignore already excludes it, but be careful when staging files manually or using git add -A.

Application Variables

These variables control how the PHP application identifies itself and constructs URLs.
APP_ENV
string
default:"development"
The runtime environment. Controls error verbosity and caching behaviour. Accepted values: development | production.Set this to production on live servers to suppress detailed error output.
APP_URL
string
default:"http://localhost:8080"
The fully-qualified public base URL of the application, including the scheme and port. Used when constructing absolute links such as password-reset emails.
APP_URL=https://comanda.example.com
BASE_URL
string
default:"/"
The path prefix under which the app is mounted. Use "/" when serving from the domain root. If the app lives at https://example.com/comanda/, set this to "/comanda/".
APP_TIMEZONE defaults to America/Costa_Rica when not present in .env. If you need a different timezone, override the value directly in config/rutas.php.

Database Variables

These variables are consumed by both the PHP application (PDO connection) and the MySQL container itself. The defaults match the Docker Compose service definitions, so they work out of the box for local development.
DB_HOST
string
default:"db"
Hostname or IP of the MySQL server. In a Docker Compose environment this should match the service name declared in docker-compose.ymldb by default. Change it only when connecting to an external database.
DB_PORT
integer
default:"3306"
TCP port on which MySQL listens. The default 3306 is correct for both the bundled container and a standard MySQL installation.
DB_NAME
string
default:"la_comanda"
Name of the database schema that the application reads from and writes to. The Docker entrypoint creates this schema automatically on first boot.
DB_USER
string
default:"lacomanda_user"
The non-root MySQL user the application connects as. Granted full privileges on DB_NAME only, following the principle of least privilege.
DB_PASSWORD
string
required
Password for DB_USER. Choose a strong, unique value — this credential is passed directly to the MySQL container at initialisation time.
MYSQL_ROOT_PASSWORD
string
required
Password for the MySQL root account. Required by the official MySQL Docker image. Keep this separate from DB_PASSWORD and store it securely.

Mailtrap Variables

La Comanda sends transactional emails (password-reset links) through Mailtrap. During development the sandbox intercepts outgoing mail so nothing reaches real inboxes. Set MAILTRAP_ENABLED=false to disable email delivery entirely.
MAILTRAP_ENABLED
boolean
default:"true"
Master switch for email delivery. When false, the application skips the send step silently — useful when no SMTP credentials are available.
MAILTRAP_TRANSPORT
string
default:"smtp"
Transport driver used by the mailer. smtp is the only supported value in the current release.
MAILTRAP_SMTP_HOST
string
default:"sandbox.smtp.mailtrap.io"
SMTP server hostname. The default points to Mailtrap’s sandbox environment. Replace with your production SMTP host when deploying to live.
MAILTRAP_SMTP_PORT
integer
default:"2525"
SMTP submission port. Mailtrap’s sandbox accepts connections on 2525. Common alternatives are 587 (STARTTLS) and 465 (implicit TLS).
MAILTRAP_SMTP_USERNAME
string
SMTP authentication username provided by Mailtrap (or your SMTP relay). Found in the SMTP Settings section of your Mailtrap inbox.
MAILTRAP_SMTP_PASSWORD
string
SMTP authentication password. Treat this value like any other secret — do not hard-code it or log it.
MAILTRAP_SMTP_ENCRYPTION
string
default:"tls"
Encryption protocol negotiated with the SMTP server. Accepted values: tls (STARTTLS), ssl (implicit TLS), or leave blank to disable encryption (not recommended in production).
MAILTRAP_FROM_EMAIL
string
default:"no-reply@lacomanda.local"
The From: address on all outgoing emails. Use a real, deliverable address in production to avoid spam-filter rejections.
MAILTRAP_FROM_NAME
string
default:"La Comanda"
The human-readable sender name that appears in email clients alongside the From: address.

Full Example

The block below shows a complete .env file ready for local development. Replace every placeholder (<…>) before use.
.env
# ─── Application ─────────────────────────────────────────────────────────────
APP_ENV=development
APP_URL=http://localhost:8080
BASE_URL=/

# ─── Database ─────────────────────────────────────────────────────────────────
DB_HOST=db
DB_PORT=3306
DB_NAME=la_comanda
DB_USER=lacomanda_user
DB_PASSWORD=<strong-app-password>
MYSQL_ROOT_PASSWORD=<strong-root-password>

# ─── Mailtrap ─────────────────────────────────────────────────────────────────
MAILTRAP_ENABLED=true
MAILTRAP_TRANSPORT=smtp
MAILTRAP_SMTP_HOST=sandbox.smtp.mailtrap.io
MAILTRAP_SMTP_PORT=2525
MAILTRAP_SMTP_USERNAME=<your-mailtrap-username>
MAILTRAP_SMTP_PASSWORD=<your-mailtrap-password>
MAILTRAP_SMTP_ENCRYPTION=tls
MAILTRAP_FROM_EMAIL=no-reply@lacomanda.local
MAILTRAP_FROM_NAME=La Comanda
Use a password manager or a secrets manager (such as AWS Secrets Manager or HashiCorp Vault) to generate and store DB_PASSWORD and MYSQL_ROOT_PASSWORD. Avoid reusing passwords across environments.

Build docs developers (and LLMs) love