Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JAQA20/Paradigmas-G3/llms.txt

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

Docker Compose is the recommended way to run La Comanda locally and in development environments. It orchestrates three containers — the React 19 frontend (Vite), the Express 5 + Prisma backend, and a MySQL 8.0 database — from a single configuration file, so you never need to install Node.js, TypeScript, or MySQL directly on your machine.
Prerequisites before you begin:
  • Docker Desktop — on Windows, enable the “Use WSL 2 instead of Hyper-V” option during installation and run wsl --install in an elevated PowerShell session first.
  • Git — to clone the repository.
Docker Desktop must be running (green whale icon) before any docker compose command will work.

docker-compose.yml

The file below lives at the root of the repository and defines all three services, their build contexts, port mappings, environment variables, and the shared named volume used for database persistence.
docker-compose.yml
version: '3.8'

services:
  frontend:
    build:
      context: ./frontend
    container_name: lacomanda_frontend
    ports:
      - "5173:5173"
    volumes:
      - ./frontend:/app
      - /app/node_modules
    environment:
      - VITE_API_URL=http://localhost:3000
    depends_on:
      - backend

  backend:
    build:
      context: ./backend
    container_name: lacomanda_backend
    ports:
      - "3000:3000"
    volumes:
      - ./backend:/app
      - /app/node_modules
    environment:
      - DATABASE_URL=mysql://root:rootpassword@db:3306/la_comanda
      - PORT=3000
    depends_on:
      - db

  db:
    image: mysql:8.0
    container_name: lacomanda_db
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=rootpassword
      - MYSQL_DATABASE=la_comanda
    volumes:
      - mysql_data:/var/lib/mysql

volumes:
  mysql_data:

Services overview

ServiceImage / build contextPort mappingKey environment variables
frontend./frontend (Node 20 Alpine, Vite dev server)5173:5173VITE_API_URL
backend./backend (Node 20 Alpine, nodemon + ts-node)3000:3000DATABASE_URL, PORT
dbmysql:8.03306:3306MYSQL_ROOT_PASSWORD, MYSQL_DATABASE
Once all three containers are healthy, the application is reachable at:

Common commands

Start all services (with a fresh build):
docker compose up --build
Start detached (runs in the background):
docker compose up -d --build
Stop all running containers:
docker compose down
Stop and delete all volumes (full data reset):
docker compose down -v
Stream logs from a specific service:
# Frontend logs
docker compose logs -f frontend

# Backend logs
docker compose logs -f backend
Rebuild and restart a single service without touching the others:
docker compose up --build backend
The depends_on chain enforces a strict startup order: db → backend → frontend. The backend container will not start until the db container is up, and the frontend container will not start until backend is up. If you see the backend failing to connect to MySQL on first boot, wait a few seconds and run docker compose up again — MySQL may still be initialising its data directory.

Volume persistence

The named volume mysql_data is mounted at /var/lib/mysql inside the db container. This means your database data survives container restarts and docker compose down calls. Only docker compose down -v (the -v flag) will remove the volume and wipe all stored data. This is useful for a clean-slate reset during development, but exercise caution in any environment with real data.
The docker-compose.yml in this repository contains hardcoded placeholder credentials (rootpassword) suitable only for local development. Never commit real passwords, API keys, or secrets directly into docker-compose.yml. Instead, create a .env file at the project root and reference variables using Docker Compose’s ${VARIABLE} syntax, then add .env to your .gitignore. See the Environment Variables page for the full reference.

Build docs developers (and LLMs) love