Skip to main content

Docker Compose

Use Docker Compose when you want a self-hosted Qodex stack on one machine. Compose is a good fit for internal staging, small deployments, on-premise trials, and teams that want Postgres included in the same stack. For production with managed AWS services, use the AWS Terraform reference.

What this stack includes

  • Qodex web app and agent container.
  • Postgres 17 for product state.
  • A persistent Qodex data volume for artifacts.
  • Optional Redis for queue mode.
  • Optional MinIO for S3-compatible artifact storage.

Prerequisites

  • Docker Engine 24+ with the Compose plugin.
  • At least 4 GB memory available to the Qodex container.
  • An OpenAI API key.
  • Random values for QODECLAW_SECRET_KEY and JWT_SECRET.

1. Create docker-compose.yml

The qodex-data volume stores artifacts such as screenshots, videos, DOM snapshots, logs, and attachments.

2. Add .env

Create a .env file next to the compose file.
Keep this file out of version control.

3. Start the stack

Then watch Qodex boot:
The boot log shows which critical environment variables are present. It does not print secret values.

Add Redis when you need queue mode

Redis is optional. Without Redis, the scheduler and agent runner run in the Qodex container. With Redis, Qodex can run workers and scheduler processes separately. Add Redis when you need horizontal scaling or separate worker containers:
Then set:

Add MinIO for S3-compatible storage

Use MinIO if you want the local stack to behave more like production S3.
Then configure Qodex:
Create the bucket once from the MinIO console or client before running tests that write artifacts.

When Compose is enough

Compose is usually enough for:
  • A small internal self-hosted deployment.
  • A staging or proof-of-concept environment.
  • An on-premise install behind a corporate firewall.
  • A local environment that mirrors production behavior.
Use the AWS reference when you need managed Postgres backups, HTTPS termination, central logs, and a cleaner production scaling path.

Next steps

Environment variables

See the full configuration reference.

Storage backends

Choose local disk, S3, or MinIO.

Secret management

Understand QODECLAW_SECRET_KEY before production.

AWS Terraform reference

Move from one host to managed AWS infrastructure.