Docker Compose is the recommended way to run Lightpress locally. It starts all services — the frontend client and every microservice — in a single command, wiring them together on a shared Docker network so they can communicate as they would in production. You do not need an AWS account for local development; everything runs on your machine inside Docker containers.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/reds-skywalker/Lightpress/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Install the following tools before running Lightpress locally:- Docker Desktop 4.x or later — includes the Docker Engine and the
docker composeCLI (download) - Git — to clone the repository
- A text editor to modify
.env
Lightpress uses the
docker compose CLI (V2, built into Docker Desktop) rather than the legacy docker-compose binary. If you are on an older system, upgrade to Docker Desktop 4.x or install the Compose plugin separately.Environment variables
Lightpress reads configuration from a.env file in the repository root. This file is excluded from version control by .gitignore.
Docker Compose file structure
Thedocker-compose.yml at the repository root defines one service per application component. A typical Lightpress Compose configuration includes services for the client, each microservice, and supporting infrastructure such as a database.
docker-compose.yml
build.context points to the directory containing the service’s Dockerfile. The env_file directive injects your .env variables into the container at runtime.
Starting services
Build images and start all services
Run this command from the repository root. The To run services in the background (detached mode), add the
--build flag ensures Docker builds fresh images before starting containers, picking up any code changes since the last run.-d flag:Verify services are running
Check that all containers started successfully:You should see each service with a
running status.Stopping services
down -v when you want a completely clean state — for example, to reset the database to its initial empty state. Omit -v when you want to preserve data between sessions.
Viewing logs
Rebuilding images
When you change aDockerfile or add a new dependency, rebuild the affected image before restarting:
Running commands inside a container
To open a shell in a running container or run a one-off command, usedocker compose exec:
Common issues
Port already in use
Port already in use
If a port is already bound on your host, Docker will refuse to start the conflicting service. Either stop the process occupying the port or change the host port mapping in
docker-compose.yml (e.g., change "3000:3000" to "3001:3000").Environment variables not loading
Environment variables not loading
Confirm that your
.env file is in the repository root (the same directory as docker-compose.yml) and that the variable names match exactly. Docker Compose is case-sensitive.Stale build cache causing unexpected behaviour
Stale build cache causing unexpected behaviour
Run
docker compose build --no-cache to force a full rebuild, then docker compose up -d to restart services with the fresh images.Database connection refused on startup
Database connection refused on startup
Services that depend on the database may start before the database is ready to accept connections. Add a health check to the
db service and a condition: service_healthy dependency in your application service to control startup order.