Self-hosted · Docker Compose

Run comfly on Docker

Spin up the full platform — web app, communication service, and PostgreSQL (optionally Oracle) — with a single Compose file. From zero to a running instance in three commands.

~10 minutes Docker Compose v2 Runs anywhere

Prerequisites

A single host with Docker is all you need. These images run on Linux, macOS, and Windows (WSL 2).

Docker Engine 24+

Docker Desktop or Docker Engine with the Compose v2 plugin. Check with docker compose version.

4 GB RAM & 2 GB disk

The JVM services fit comfortably in 4 GB of free memory. Allow ~2 GB of disk for the images and database volume.

Free ports 8030 / 8040 / 5432

The web app, communication service, and PostgreSQL bind to these host ports. Remap them in the Compose file if they clash.

Quick start

Create a project folder, drop in two files, and start the stack. Copy each block with the button in its top-right corner.

1
Create a project folder
Terminal
mkdir comfly && cd comfly
2
Add docker-compose.yml

Save this minimal Compose file. It pulls the official images and wires the three services together on an internal network.

docker-compose.yml
services:
  ccm-postgres-db:
    image: altuxo/ccm-postgres-db:latest
    container_name: ccm-postgres-db
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_MULTIPLE_DATABASES: ccm
    ports:
      - "5432:5432"
    volumes:
      - vol-db:/var/lib/postgresql/data

  ccm-web-app:
    image: altuxo/ccm-web-app:latest
    container_name: ccm-web-app
    depends_on: [ccm-postgres-db]
    env_file: .env
    environment:
      SPRING_PROFILES_ACTIVE: docker,oauth
    ports:
      - "8030:8030"
    volumes:
      - ccm-logs:/ccm-logs

  ccm-communication-service:
    image: altuxo/ccm-communication-service:latest
    container_name: ccm-communication-service
    depends_on: [ccm-postgres-db]
    env_file: .env
    environment:
      SPRING_PROFILES_ACTIVE: docker,oauth,batch
    ports:
      - "8040:8040"
    volumes:
      - ccm-logs:/ccm-logs

volumes:
  vol-db:
  ccm-logs:
3
Add a .env file

Compose reads this file for the values above and passes them to the containers. Replace every change-me and the Cognito placeholders — see Configure your environment for what each key does.

.env
# --- Admin bootstrap ---
CCM_ADMIN_USERNAME=admin
CCM_ADMIN_PASSWORD=change-me-please

# --- Database (must match the Postgres service) ---
POSTGRES_USER=postgres
POSTGRES_PASSWORD=change-me-please
CCM_DB_HOST=ccm-postgres-db
CCM_DB_PORT=5432
CCM_DB_NAME=ccm
CCM_DB_USERNAME=postgres
CCM_DB_PASSWORD=change-me-please

# --- TLS off for a quick local HTTP start ---
SSL_ENABLED=false
CCM_WEB_APP_SSL_ENABLED=false

# --- Authentication (OAuth2 / OIDC) — required to sign in ---
AWS_REGION=eu-west-1
OAUTH_AUTHORIZATION_HOST=your-pool.auth.eu-west-1.amazoncognito.com
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER_URI=https://cognito-idp.eu-west-1.amazonaws.com/eu-west-1_xxxxxxxxx
COGNITO_POST_LOGOUT_REDIRECT_URI=http://localhost:8030/

# --- Outbound email (SMTP) ---
SMTP_HOST=smtp.example.com
SMTP_USERNAME=comfly@example.com
SMTP_PASSWORD=change-me-please
4
Start the stack

Pull the images and launch everything in the background:

Terminal
docker compose up -d
First launch takes a moment. The database provisions its schemas and the JVM services warm up — allow 30–60 seconds before the health check turns green.

Configure your environment

These are the keys you must set before comfly is usable. Everything else has a sensible default in the images.

VariablePurposeRequired
CCM_ADMIN_USERNAME
CCM_ADMIN_PASSWORD
Bootstrap administrator used for the first sign-in and emergency access. Required
POSTGRES_USER
POSTGRES_PASSWORD
Credentials the database is created with. The CCM_DB_* values must match them. Required
CCM_DB_HOST · CCM_DB_NAME
CCM_DB_USERNAME · CCM_DB_PASSWORD
How the app connects to PostgreSQL. Inside Compose the host is the service name ccm-postgres-db. Required
OAUTH_AUTHORIZATION_HOST
…JWT_ISSUER_URI
comfly authenticates through OAuth2 / OIDC. Add http://localhost:8030/login/oauth2/code/cognito as a callback URL in your user-pool app client. Required
SMTP_HOST · SMTP_USERNAME
SMTP_PASSWORD
Outbound mail server for email delivery and notifications. For email
SSL_ENABLED
CCM_WEB_APP_SSL_ENABLED
Set true and mount a keystore to serve HTTPS directly, or keep false and terminate TLS at a reverse proxy / load balancer. Optional
Never commit real secrets. Keep .env out of version control and use strong, unique values for every password and the admin account before exposing the instance beyond localhost.

Verify it's running

Check the containers are up and the web app reports a healthy status.

Terminal
docker compose ps
curl -fsS http://localhost:8030/api/actuator/health
Expected output
{"status":"UP"}

Then open http://localhost:8030 in your browser and sign in with the admin account you configured. 🎉

Optional services

The full platform Compose file ships additional capabilities behind Compose profiles. Enable them with --profile flags on the full stack.

Workspaces

Multi-tenant workspaces, invitations, and role-based access via the tenant service (port 8050).

--profile ccm --profile tenant

Monitoring

Monitoring services for dashboard, centralized logs, alerting and metrics.

--profile monitoring

API docs

Documentation for the Comfly REST API reference.

--profile api-docs
Full stack, all at once. With the complete platform Compose file you can combine profiles, for example docker compose --profile ccm --profile tenant up -d to run the core services together with workspaces.

Troubleshooting

The usual suspects when a fresh install misbehaves.

Port is already allocated
Another process holds 8030, 8040, or 5432. Change the left-hand side of the port mapping in docker-compose.yml (e.g. "18030:8030") and restart.
Web app can't reach the database
Make sure CCM_DB_PASSWORD matches POSTGRES_PASSWORD and that CCM_DB_HOST is the service name ccm-postgres-db. Give Postgres a few seconds to finish its first-run initialization.
Sign-in redirect fails
Confirm the Cognito callback URL http://localhost:8030/login/oauth2/code/cognito is registered on the app client, and that …JWT_ISSUER_URI points at the same user pool.
Inspect logs or start over
Tail a service with docker compose logs -f ccm-web-app. To wipe everything including the database volume and start clean, run docker compose down -v.

Up and running? Here's what's next.

Design your first template, wire up a data source, and deliver across channels — or talk to us about a production-grade rollout.