Deploying Assurance-as-Code
The backend runs as a set of containers managed by Docker Compose. A single docker compose up brings up everything needed: the API, the database, the background job queue, and the web console.
What gets deployed
| Service | Role |
|---|---|
api | FastAPI backend — handles all artifact, project, and baseline operations |
db | PostgreSQL — stores all projects, artifacts, relationships, and audit events |
worker | ARQ background job runner — processes async validation and gate checks |
redis | Job queue for the background worker |
console | Lightweight web console for browsing projects and artifacts |
nginx | Reverse proxy — routes traffic to the API and console |
Prerequisites
- Docker and Docker Compose installed on the host machine
- Port
80(or your configured port) available - At least 2 GB of free disk space for the database volume
1) Clone the repository
git clone https://github.com/polyplay/lydianai_assurance_as_code.git
cd lydianai_assurance_as_code
2) Configure environment variables
Copy the example environment file and fill in the required values:
cp .env.example .env
Key variables to set:
# Database
POSTGRES_USER=assurance
POSTGRES_PASSWORD=changeme
POSTGRES_DB=assurance_db
# API secret for signing tokens
SECRET_KEY=your-secret-key-here
# Optional: set a base URL if running behind a proxy
BASE_URL=http://localhost
3) Start the services
docker compose up -d
The first run will pull images and initialise the database schema. This takes a minute or two.
Check that all services are healthy:
docker compose ps
4) Access the web console
Open http://localhost in a browser. The console lets you browse projects, view artifacts, and inspect traceability chains without using the API directly.
The API is available at http://localhost/api. Interactive API documentation (Swagger UI) is at http://localhost/api/docs.
Stopping and restarting
# Stop all services (data is preserved in volumes)
docker compose down
# Stop and remove all data
docker compose down -v
Next steps
- Creating a project — set up your first SW System project
- Managing artifacts — add requirements, hazard analyses, test cases