Lightpress uses Docker Compose to orchestrate all services locally in a single command. Rather than running each microservice and the client in separate terminals with different dependency versions,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.
docker compose up brings up the full stack — client, microservices, and supporting infrastructure like the database — in isolated containers that mirror the production environment.
You need Docker Engine 24+ and the Compose plugin (or Docker Desktop 4.x+) installed. Check your versions with
docker --version and docker compose version.File structure
Thedocker-compose.yml at the project root defines all services. Here is a representative configuration for Lightpress:
docker-compose.yml
Services
Each top-level key underservices becomes a named container. Lightpress defines the following services:
postgres
postgres
The shared PostgreSQL database used by services that require persistent relational storage. It uses a named volume (
postgres_data) so your data survives container restarts. A healthcheck ensures other services only start once PostgreSQL is accepting connections.In production, replace this container with Amazon RDS — the database is only included in Compose for local development convenience.auth-service
auth-service
Handles user registration, login, token issuance, and token refresh. It depends on
postgres with a service_healthy condition so it waits for the database to be ready before starting. The src/ directory is bind-mounted so that source changes reload automatically when running with a file watcher (e.g. nodemon).billing-service
billing-service
Manages subscription plans, payment processing, and invoice generation. It depends on
auth-service to validate tokens on incoming requests. Connect it to your Stripe keys via environment variables.client
client
The frontend application served by a development server (Vite by default). Bind mounts
src/ and public/ for hot-module replacement during development. In production, build a static bundle and serve it from S3 + CloudFront rather than running this container.Key configuration sections
Ports
Port mappings use the"host:container" format. The host port is what you access in your browser; the container port is what the service listens on internally.
Volumes
Lightpress uses two types of volumes:| Type | Example | Purpose |
|---|---|---|
| Named volume | postgres_data:/var/lib/postgresql/data | Persist database data across docker compose down restarts |
| Bind mount | ./microservices/auth-service/src:/app/src | Sync local source files into the container for live reload |
Networks
All services share a singlebridge network named lightpress. This allows containers to address each other by service name (e.g. http://auth-service:3001) rather than by IP address.
depends_on
depends_on controls startup order. By default it only waits for the container to start, not for the application inside to be ready. Use condition: service_healthy together with a healthcheck definition to wait for genuine readiness:
Common commands
Adding a new microservice
When you add a new service to Lightpress, register it indocker-compose.yml following the same pattern as the existing microservices:
Add a service block
Copy an existing service block (e.g.
billing-service) and update the context, port, SERVICE_NAME, and any service-specific environment variables.Connect it to the network
Add
networks: - lightpress to ensure it can communicate with other services by name.Add dependencies
If your service requires the database or depends on another service being ready first, add a
depends_on block with the appropriate condition.Expose the port
Add a
ports entry so you can call the service directly from your browser or API client during development.