- Docker and Docker Compose v2
- Java 21 and Maven 3.9+ for running tests outside containers
An environment file is optional for the default local Compose stack. Create one when you need to override defaults or enable optional integrations:
cp .env.example .envKeep .env local. It is ignored by Git and must not contain production secrets.
Required variables for the API:
DATABASE_URLDATABASE_USERNAMEDATABASE_PASSWORDJWT_SECRETGOOGLE_CLIENT_IDCORS_ALLOWED_ORIGINSRATE_LIMIT_STORAGESPRING_DATA_REDIS_HOST(orSPRING_DATA_REDIS_URL)SPRING_DATA_REDIS_PORTRATE_LIMIT_KEY_PREFIXRATE_LIMIT_*_REQUESTSandRATE_LIMIT_*_WINDOWvalues when overriding defaults
Compose sets DATABASE_URL to jdbc:postgresql://postgres:5432/loopin for the API container and sets Redis host to redis. Local JVM runs can keep the .env.example localhost defaults.
The default local stack does not start loopin-ai, so durable embedding workers are disabled by
default. To enable them, provide both LOOPIN_AI_SERVICE_TOKEN and a LOOPIN_AI_BASE_URL that is
reachable from the API container (for example, another Compose service hostname). Do not use
http://localhost:8000 unless loopin-ai runs in the API container itself.
Build the Docker image:
docker build -t loopin-api:local .Run tests locally:
mvn testStart PostgreSQL, Redis, and the API:
docker compose up --buildStart in the background:
docker compose up --build -dView logs:
docker compose logs -f apiStop services:
docker compose downStop services and remove local data volumes:
docker compose down -vWhen RATE_LIMIT_STORAGE=redis, the API uses the Compose Redis service through SPRING_DATA_REDIS_HOST=redis. Liquibase runs automatically on API startup when LIQUIBASE_ENABLED=true.
docker-compose.smoke.yml is separate from the local development stack. It runs the already-built loopin-api:ci image with the production profile alongside pgvector PostgreSQL 16 and Redis, and does not start n8n or MinIO. The check polls GET /api/actuator/health/readiness, confirms Liquibase records in PostgreSQL, and calls the public GET /api/v1/events?page=0&size=1 endpoint.
docker build -t loopin-api:ci .
bash scripts/ci/run-production-image-smoke.sh
docker compose -p loopin-production-smoke -f docker-compose.smoke.yml down -v --remove-orphansThe script chooses an available localhost port unless SMOKE_API_PORT is set. It uses only non-sensitive CI-style dummy configuration; do not substitute deployment secrets. In GitHub Actions, failure diagnostics are printed and uploaded as production-image-smoke-logs before the environment is removed.