Skip to content

⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.

feat: add Pro edition deploy files for Docker Compose, Coolify, and Helm (#677)

Croffa46ad1f421b9
diff --git a/AGENTS.md b/AGENTS.md
index 07afdf9e..f9ae477c 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -151,7 +151,7 @@ workflow for a job that an existing workflow already runs.
process at **startup**. Never use `NEXT_PUBLIC_*` for them: `next build` inlines those into
the bundle, and the image then works for one instance only.
- Add a new environment variable to `.env.example`. If a service needs it, also add it to the
- three deploy compose files and to the Helm chart: `values.yaml`,
+ five deploy compose files and to the Helm chart: `values.yaml`,
`templates/configmap.yaml` or `templates/secret.yaml`, and the values table in
`charts/itsaplan/README.md`.
@@ -159,8 +159,12 @@ workflow for a job that an existing workflow already runs.
- `docker-compose.dev.yml` holds only the local backing services (Postgres + RustFS). The apps
run on the host. The deploy composes do NOT publish the DB port.
-- A deploy stack change usually needs an edit in **all three** of `docker-compose.yml`,
- `docker-compose.coolify.yml`, `docker-compose.coolify-images.yml`, and in the Helm chart.
+- A deploy stack change usually needs an edit in **all five** of `docker-compose.yml`,
+ `docker-compose.pro.yml`, `docker-compose.coolify.yml`, `docker-compose.coolify-images.yml`,
+ `docker-compose.coolify-pro.yml`, and in the Helm chart.
+- `docker-compose.pro.yml` and `docker-compose.coolify-pro.yml` run the published Pro
+ images: migrate from `vendor/itsaplan/packages/db/src/migrate.ts`, start the api with
+ `./pro-api`. The Helm chart does the same when `pro: true` (`values-pro.yaml`).
- Never add `image:` to `docker-compose.coolify.yml`. With both `image:` and `build:` Coolify
still builds and stops making rollback images.
- Migrations run as a separate step before the apps start:
diff --git a/README.md b/README.md
index 9b010793..84d00133 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ If It's a Plan looks useful to you, star the repo ⭐ — it helps other people
<a href="docs/coolify.md"><img src="assets/coolify-button.svg" alt="Deploy on Coolify" height="40" /></a>
<a href="docs/self-hosting.md"><img src="assets/docker-button.svg" alt="Self-host with Docker" height="40" /></a>
-[Website](https://itsaplan.dev) · [Discussions](https://github.com/croffasia/itsaplan/discussions) · [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md) · [Leave a review](https://www.producthunt.com/products/it-s-a-plan/reviews/new?utm_source=badge-product_review&utm_medium=badge)
+[Website](https://itsaplan.dev) · [Pro](https://itsaplan.dev/pro) · [Discussions](https://github.com/croffasia/itsaplan/discussions) · [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md) · [Leave a review](https://www.producthunt.com/products/it-s-a-plan/reviews/new?utm_source=badge-product_review&utm_medium=badge)
[![License: AGPL v3](https://img.shields.io/badge/license-AGPL--3.0-blue.svg)](LICENSE)
[![CI](https://github.com/croffasia/itsaplan/actions/workflows/ci.yml/badge.svg)](https://github.com/croffasia/itsaplan/actions/workflows/ci.yml)
@@ -127,6 +127,31 @@ release.
</details>
+## Pro edition
+
+Buying Pro supports It's a Plan. The license pays for the work on Community, the free edition:
+new features, fixes, and releases for everyone who self-hosts. In return, your instance gets the
+Pro features below, with full control over AI agents and what they spend. One license covers one
+instance, with no limit on seats or workspaces.
+
+| | Community | Pro |
+| --- | --- | --- |
+| Workspaces | One per person | Any number |
+| SSO and SCIM | One OIDC provider and one SCIM for the instance | SAML or OIDC and SCIM per workspace |
+| Audit log | — | Every action, with changes before and after |
+| Workspace dashboard | — | Issues, agent runs, schedules, and logged time for every team |
+| Agent schedules | Timer or state change | Plus issue events, filters, and run limits |
+| Agent analytics | Tokens and cost | Plus cost by person and trigger, run time, and tool calls |
+| AI budgets | — | Limits for the workspace, teams, projects, and each person |
+
+Deploy Pro with [`docker-compose.pro.yml`](docs/self-hosting.md),
+[`docker-compose.coolify-pro.yml`](docs/coolify.md), or [`values-pro.yaml`](docs/helm.md), and
+enter the license key in god mode, under **License**. Without a key, or after the license ends,
+the Pro images run as Community. Both editions use the same database, so an instance moves
+between them with its data.
+
+**[Pricing and license terms →](https://itsaplan.dev/pro)**
+
## Getting started
### Deploy on Railway — recommended
diff --git a/charts/itsaplan/README.md b/charts/itsaplan/README.md
index 212bb652..6f43c2e1 100644
--- a/charts/itsaplan/README.md
+++ b/charts/itsaplan/README.md
@@ -148,6 +148,17 @@ bot:
enabled: false
```
+## Pro edition
+
+`values-pro.yaml` runs the Pro images. Pass it before your own values file:
+
+```bash
+helm install itsaplan charts/itsaplan -f charts/itsaplan/values-pro.yaml -f values.yaml
+```
+
+Without a valid license the Pro images run as the core does. The license key is entered in
+god mode, under **License**.
+
## Values reference
### Global
@@ -159,6 +170,7 @@ bot:
| `nodeSelector` | Global node selector (per-component overrides take precedence) | `{}` |
| `tolerations` | Global tolerations | `[]` |
| `affinity` | Global affinity | `{}` |
+| `pro` | Run the Pro images (set by `values-pro.yaml`) | `false` |
| `imagePullSecrets` | Image pull secrets for private registries | `[]` |
| `podSecurityContext` | Pod-level security context | `{}` |
| `securityContext` | Container-level security context | `{}` |
diff --git a/charts/itsaplan/templates/_helpers.tpl b/charts/itsaplan/templates/_helpers.tpl
index ed3a7b8d..5b1de51c 100644
--- a/charts/itsaplan/templates/_helpers.tpl
+++ b/charts/itsaplan/templates/_helpers.tpl
@@ -89,7 +89,7 @@ initContainers:
- name: wait-for-migrations
image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.api.image.pullPolicy }}
- command: ["bun", "run", "packages/db/src/wait-for-migrations.ts"]
+ command: ["bun", "run", "{{ if .Values.pro }}vendor/itsaplan/{{ end }}packages/db/src/wait-for-migrations.ts"]
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 6 }}
diff --git a/charts/itsaplan/templates/deployment-api.yaml b/charts/itsaplan/templates/deployment-api.yaml
index f049254a..00b58241 100644
--- a/charts/itsaplan/templates/deployment-api.yaml
+++ b/charts/itsaplan/templates/deployment-api.yaml
@@ -49,7 +49,7 @@ spec:
- name: migrate
image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.api.image.pullPolicy }}
- command: ["bun", "run", "packages/db/src/migrate.ts"]
+ command: ["bun", "run", "{{ if .Values.pro }}vendor/itsaplan/{{ end }}packages/db/src/migrate.ts"]
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
@@ -66,7 +66,7 @@ spec:
- name: api
image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.api.image.pullPolicy }}
- command: ["bun", "run", "apps/api/src/index.ts"]
+ command: {{ if .Values.pro }}["./pro-api"]{{ else }}["bun", "run", "apps/api/src/index.ts"]{{ end }}
volumeMounts:
- name: backups
mountPath: /backups
diff --git a/charts/itsaplan/values-pro.yaml b/charts/itsaplan/values-pro.yaml
new file mode 100644
index 00000000..1d9fd286
--- /dev/null
+++ b/charts/itsaplan/values-pro.yaml
@@ -0,0 +1,17 @@
+# The Pro images. Without a valid license they run as the core does; the instance owner
+# enters the license key in god mode, under License.
+# helm install itsaplan charts/itsaplan -f charts/itsaplan/values-pro.yaml -f values.yaml
+pro: true
+
+api:
+ image:
+ repository: ghcr.io/croffasia/itsaplan-pro-api
+web:
+ image:
+ repository: ghcr.io/croffasia/itsaplan-pro-web
+worker:
+ image:
+ repository: ghcr.io/croffasia/itsaplan-pro-worker
+bot:
+ image:
+ repository: ghcr.io/croffasia/itsaplan-pro-bot
diff --git a/charts/itsaplan/values.yaml b/charts/itsaplan/values.yaml
index 60d225b9..36522109 100644
--- a/charts/itsaplan/values.yaml
+++ b/charts/itsaplan/values.yaml
@@ -7,6 +7,10 @@ nodeSelector: {}
tolerations: []
affinity: {}
+# -- Runs the Pro images, which keep the core's source under vendor/itsaplan and start
+# the api with ./pro-api. values-pro.yaml sets it with the Pro image repositories.
+pro: false
+
# -- Image pull secrets for private registries
imagePullSecrets: []
diff --git a/docker-compose.coolify-pro.yml b/docker-compose.coolify-pro.yml
new file mode 100644
index 00000000..16990dd0
--- /dev/null
+++ b/docker-compose.coolify-pro.yml
@@ -0,0 +1,252 @@
+# ─────────────────────────────────────────────────────────────
+# Coolify stack of the Pro edition: postgres + rustfs + api + worker + bot + web.
+# In Coolify: New Resource → Docker Compose Empty → paste this file. Nothing is built;
+# the four services run the Pro images published to GHCR on each release, and VERSION
+# picks one (unset means the newest). Without a valid license the Pro images run as the
+# core does; the instance owner enters the license key in god mode, under License.
+#
+# The core images are in docker-compose.coolify-images.yml.
+#
+# SERVICE_PASSWORD_* / SERVICE_URL_* are Coolify magic variables: generated and
+# persisted on first deploy, stable across deploys. api and web each declare their own
+# domain by listing SERVICE_URL_API_3000 / SERVICE_URL_WEB_3001 without a value; everything
+# else reads them back. A SERVICE_URL_* key in any other service declares a domain there
+# too, which is why worker and bot address the api through API_URL instead.
+#
+# No host port is published: Coolify's proxy reaches the containers over the internal
+# network, and a `ports:` entry here turns into a second, malformed domain.
+#
+# Coolify reports the worst container health as the resource status, so a service
+# without a healthcheck holds the whole stack at "running (unknown)". Services that
+# answer no requests are taken out of that aggregate with `exclude_from_hc: true`
+# (a Coolify key, stripped before compose runs) or, for one-shot containers, by
+# `restart: 'no'`, which it treats the same way.
+# ─────────────────────────────────────────────────────────────
+services:
+ postgres:
+ image: postgres:17-alpine
+ restart: unless-stopped
+ environment:
+ POSTGRES_USER: ${POSTGRES_USER:-itsaplan}
+ POSTGRES_PASSWORD: ${SERVICE_PASSWORD_POSTGRES}
+ POSTGRES_DB: ${POSTGRES_DB:-itsaplan}
+ volumes:
+ - postgres-data:/var/lib/postgresql/data
+ healthcheck:
+ test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-itsaplan} -d ${POSTGRES_DB:-itsaplan}']
+ interval: 5s
+ timeout: 5s
+ retries: 10
+
+ # S3-compatible object store for issue attachments (RustFS).
+ # Both the S3 API (:9000) and the console (:9001) are internal only — the api
+ # streams attachment bytes over the internal network, so no port is published.
+ # Administer through an S3 client from inside the network or an SSH tunnel.
+ #
+ # The service, its volume and the SERVICE_*_MINIO credentials keep the names of the
+ # MinIO stack this replaced: a renamed service would leave the old MinIO container
+ # running on the same volume, a renamed volume would start empty, and renamed
+ # credentials would be generated anew. RustFS reads the files MinIO wrote in place;
+ # MinIO wrote them as root, so the container runs as root to keep them writable.
+ minio:
+ image: rustfs/rustfs:1.0.0
+ restart: unless-stopped
+ user: '0:0'
+ environment:
+ RUSTFS_ACCESS_KEY: ${SERVICE_USER_MINIO}
+ RUSTFS_SECRET_KEY: ${SERVICE_PASSWORD_MINIO}
+ volumes:
+ - minio-data:/data
+ healthcheck:
+ test: ['CMD', 'curl', '-fsS', '-o', '/dev/null', 'http://127.0.0.1:9000/health']
+ interval: 15s
+ timeout: 5s
+ retries: 5
+ start_period: 20s
+
+ # One-shot: creates the attachments bucket, then exits. A PUT on a bucket that
+ # already exists succeeds, so it runs on every start.
+ # restart "no" is explicit: it exits 0 by design, and platforms that inject
+ # restart: unless-stopped (e.g. Coolify) would otherwise loop it forever and
+ # trip their restart-count limit, tearing the whole stack down.
+ minio-init:
+ image: rustfs/rustfs:1.0.0
+ restart: 'no'
+ depends_on:
+ minio:
+ condition: service_healthy
+ environment:
+ S3_ACCESS_KEY_ID: ${SERVICE_USER_MINIO}
+ S3_SECRET_ACCESS_KEY: ${SERVICE_PASSWORD_MINIO}
+ S3_BUCKET: ${S3_BUCKET:-planner-attachments}
+ entrypoint: >
+ /bin/sh -c "
+ curl -fsS -X PUT --aws-sigv4 aws:amz:us-east-1:s3 --user \"$$S3_ACCESS_KEY_ID:$$S3_SECRET_ACCESS_KEY\" http://minio:9000/\"$$S3_BUCKET\" &&
+ echo 'bucket ready: '\"$$S3_BUCKET\"
+ "
+
+ # One-shot: dumps the database and applies the migrations, then exits. api, worker
+ # and bot start only after it succeeds, so none of them runs against an old schema.
+ # restart 'no' keeps a finished run from being started again.
+ migrate:
+ image: ghcr.io/croffasia/itsaplan-pro-api:${VERSION:-latest}
+ restart: 'no'
+ exclude_from_hc: true
+ command: ['bun', 'run', 'vendor/itsaplan/packages/db/src/migrate.ts']
+ depends_on:
+ postgres:
+ condition: service_healthy
+ environment:
+ - DATABASE_URL=postgres://${POSTGRES_USER:-itsaplan}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-itsaplan}
+ # How long the dumps are kept, and the switch that upgrades without one.
+ # BACKUP_DIR is not among them: the volume below pins it.
+ - BACKUP_RETENTION_DAYS=${BACKUP_RETENTION_DAYS:-}
+ - SKIP_PRE_MIGRATION_BACKUP=${SKIP_PRE_MIGRATION_BACKUP:-}
+ # Holds the dump taken before a release's migrations, kept for
+ # BACKUP_RETENTION_DAYS (30) so a downgrade has something to restore.
+ volumes:
+ - db-backups:/backups
+
+ api:
+ image: ghcr.io/croffasia/itsaplan-pro-api:${VERSION:-latest}
+ restart: unless-stopped
+ # The image's own CMD migrates first; here the migrate service has done that.
+ command: ['./pro-api']
+ depends_on:
+ postgres:
+ condition: service_healthy
+ migrate:
+ condition: service_completed_successfully
+ minio:
+ condition: service_started
+ environment:
+ # Listed without a value, this asks Coolify for the public domain of this
+ # service on port 3000. The port belongs to the declaration only — the value read
+ # back below is SERVICE_URL_API, which Coolify derives from it without the port.
+ - SERVICE_URL_API_3000
+ - NODE_ENV=production
+ - API_PORT=3000
+ - DATABASE_URL=postgres://${POSTGRES_USER:-itsaplan}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-itsaplan}
+ - BETTER_AUTH_SECRET=${SERVICE_PASSWORD_64_BETTERAUTH}
+ # Encrypts stored AI provider API keys at rest (AES-256-GCM). Changing it makes
+ # existing stored credentials undecryptable.
+ - APP_ENCRYPTION_KEY=${SERVICE_PASSWORD_64_ENCRYPTION}
+ # API_URL is the api origin; APP_URL is the web origin.
+ - API_URL=${SERVICE_URL_API}
+ - APP_URL=${SERVICE_URL_WEB}
+ # To override the cookie parent domain (multi-label TLDs / deep subdomains),
+ # add a COOKIE_DOMAIN env in Coolify — the code reads it if present.
+ # Where the client IP for the rate limit is read; empty reads X-Forwarded-For.
+ - CLIENT_IP_HEADER=${CLIENT_IP_HEADER:-}
+ - TRUSTED_PROXIES=${TRUSTED_PROXIES:-}
+ # Public origin for incoming Git webhooks when API_URL is private; empty uses API_URL.
+ - GIT_WEBHOOK_BASE_URL=${GIT_WEBHOOK_BASE_URL:-}
+ - S3_ENDPOINT=http://minio:9000
+ - S3_BUCKET=${S3_BUCKET:-planner-attachments}
+ - S3_ACCESS_KEY_ID=${SERVICE_USER_MINIO}
+ - S3_SECRET_ACCESS_KEY=${SERVICE_PASSWORD_MINIO}
+ - S3_REGION=${S3_REGION:-us-east-1}
+ - S3_FORCE_PATH_STYLE=${S3_FORCE_PATH_STYLE:-}
+ # Hosts trusted even though they resolve privately. Also governs webhook URL
+ # validation and attachment import.
+ - SSRF_ALLOWED_HOSTS=${SSRF_ALLOWED_HOSTS:-}
+ healthcheck:
+ test: ['CMD', 'wget', '-q', '-O', '/dev/null', 'http://127.0.0.1:3000/']
+ interval: 15s
+ timeout: 5s
+ retries: 5
+ start_period: 30s
+
+ # Background worker for webhook delivery, agent schedules, and autonomous agent
+ # runs. Shares the database with the api. No public ports, so nothing to probe.
+ worker:
+ image: ghcr.io/croffasia/itsaplan-pro-worker:${VERSION:-latest}
+ restart: unless-stopped
+ exclude_from_hc: true
+ depends_on:
+ postgres:
+ condition: service_healthy
+ migrate:
+ condition: service_completed_successfully
+ environment:
+ NODE_ENV: production
+ DATABASE_URL: postgres://${POSTGRES_USER:-itsaplan}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-itsaplan}
+ # Notification delivery sends email and Telegram messages itself, with the
+ # provider credentials stored in the database — encrypted with this key, the
+ # same value the api uses.
+ APP_ENCRYPTION_KEY: ${SERVICE_PASSWORD_64_ENCRYPTION}
+ # Anonymous telemetry (TELEMETRY.md). Either variable, set to anything but 0,
+ # turns it off.
+ TELEMETRY_DISABLED: ${TELEMETRY_DISABLED:-}
+ DO_NOT_TRACK: ${DO_NOT_TRACK:-}
+ TELEMETRY_DEBUG: ${TELEMETRY_DEBUG:-}
+ # The same list the api reads. This process delivers webhooks to those hosts.
+ SSRF_ALLOWED_HOSTS: ${SSRF_ALLOWED_HOSTS:-}
+ # A downloaded Plane import attachment is stored here, the same bucket the
+ # api's own uploads use.
+ S3_ENDPOINT: http://minio:9000
+ S3_BUCKET: ${S3_BUCKET:-planner-attachments}
+ S3_ACCESS_KEY_ID: ${SERVICE_USER_MINIO}
+ S3_SECRET_ACCESS_KEY: ${SERVICE_PASSWORD_MINIO}
+ S3_REGION: ${S3_REGION:-us-east-1}
+ S3_FORCE_PATH_STYLE: ${S3_FORCE_PATH_STYLE:-}
+ # Optional tuning — defaults live in apps/worker/src/config.ts:
+ # WEBHOOK_POLL_INTERVAL_MS, WEBHOOK_BATCH_SIZE, WEBHOOK_TIMEOUT_MS,
+ # WEBHOOK_MAX_ATTEMPTS, WEBHOOK_DISABLE_THRESHOLD, WEBHOOK_LEASE_SECONDS,
+ # WEBHOOK_CLEANUP_DAYS, WEBHOOK_CLEANUP_EVERY_TICKS.
+ # Agent schedules: AGENT_RUN_POLL_INTERVAL_MS. The api runs the queued runs
+ # and reads the other AGENT_RUN_* values.
+
+ # Telegram bot: long polling for the instance bot, completing the account links
+ # users start from their profile. It reads the bot token and writes the links in the
+ # database, and holds no api credential — no public ports either.
+ #
+ # Must stay at one replica: Telegram hands each getUpdates call to a single caller,
+ # so a second instance would take updates away from the first.
+ bot:
+ image: ghcr.io/croffasia/itsaplan-pro-bot:${VERSION:-latest}
+ restart: unless-stopped
+ exclude_from_hc: true
+ depends_on:
+ postgres:
+ condition: service_healthy
+ migrate:
+ condition: service_completed_successfully
+ environment:
+ NODE_ENV: production
+ DATABASE_URL: postgres://${POSTGRES_USER:-itsaplan}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-itsaplan}
+ APP_ENCRYPTION_KEY: ${SERVICE_PASSWORD_64_ENCRYPTION}
+ # The bot token itself is not set here: it is stored in the database and edited
+ # in god mode, so the service picks up a change without a redeploy.
+ # Optional tuning — defaults live in apps/bot/src/config.ts:
+ # BOT_CONFIG_POLL_INTERVAL_MS, BOT_CONFIG_RETRY_INTERVAL_MS.
+
+ web:
+ image: ghcr.io/croffasia/itsaplan-pro-web:${VERSION:-latest}
+ restart: unless-stopped
+ depends_on:
+ - api
+ environment:
+ # Declares this service's public domain on port 3001; see the api service.
+ - SERVICE_URL_WEB_3001
+ - NODE_ENV=production
+ - PORT=3001
+ - HOSTNAME=0.0.0.0
+ # The api origin the browser uses. web streams avatars and attachments from the
+ # same origin (/media), so they are served from the web origin.
+ - API_URL=${SERVICE_URL_API}
+ # Legal document URLs shown on the logged-out screens; empty hides the notice.
+ - PRIVACY_URL=${PRIVACY_URL:-}
+ - TERMS_URL=${TERMS_URL:-}
+ # /login renders without a session, and without reaching the api.
+ healthcheck:
+ test: ['CMD', 'wget', '-q', '-O', '/dev/null', 'http://127.0.0.1:3001/login']
+ interval: 15s
+ timeout: 5s
+ retries: 5
+ start_period: 20s
+
+volumes:
+ postgres-data:
+ minio-data:
+ db-backups:
diff --git a/docker-compose.pro.yml b/docker-compose.pro.yml
new file mode 100644
index 00000000..b30e7166
--- /dev/null
+++ b/docker-compose.pro.yml
@@ -0,0 +1,238 @@
+# ─────────────────────────────────────────────────────────────
+# Self-hosting stack of the Pro edition: the stack of docker-compose.yml on the Pro
+# images. Without a valid license the Pro images run as the core does; the instance
+# owner enters the license key in god mode, under License.
+#
+# cp .env.example .env # fill in the required values below
+# docker compose -f docker-compose.pro.yml up -d
+#
+# Required in .env (the stack refuses to start without them):
+# POSTGRES_PASSWORD, BETTER_AUTH_SECRET, APP_ENCRYPTION_KEY,
+# S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, API_URL, APP_URL
+# Generate each secret with: openssl rand -base64 32
+#
+# The Pro source is not in this repository, so the images are pulled, never built:
+# docker compose -f docker-compose.pro.yml pull && docker compose -f docker-compose.pro.yml up -d
+# VERSION in .env pins a release (defaults to the latest one).
+#
+# The project name and the volumes are those of docker-compose.yml, so an instance
+# started from it moves to Pro in place, on the same data.
+# ─────────────────────────────────────────────────────────────
+name: itsaplan
+
+services:
+ postgres:
+ image: postgres:17-alpine
+ restart: unless-stopped
+ environment:
+ POSTGRES_USER: ${POSTGRES_USER:-itsaplan}
+ POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}
+ POSTGRES_DB: ${POSTGRES_DB:-itsaplan}
+ volumes:
+ - postgres-data:/var/lib/postgresql/data
+ healthcheck:
+ test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-itsaplan} -d ${POSTGRES_DB:-itsaplan}']
+ interval: 5s
+ timeout: 5s
+ retries: 10
+
+ # S3-compatible object store for issue attachments (RustFS).
+ # Both the S3 API (:9000) and the console (:9001) stay inside the compose
+ # network: the api streams attachment bytes through itself, so no port is
+ # published. Administer through an S3 client from inside the network or an SSH tunnel.
+ #
+ # The service and volume keep the names of the MinIO stack this replaced: a renamed
+ # service would leave the old MinIO container running on the same volume, and a
+ # renamed volume would start empty. RustFS reads the files MinIO wrote in place;
+ # MinIO wrote them as root, so the container runs as root to keep them writable.
+ minio:
+ image: rustfs/rustfs:1.0.0
+ restart: unless-stopped
+ user: '0:0'
+ environment:
+ RUSTFS_ACCESS_KEY: ${S3_ACCESS_KEY_ID:?set S3_ACCESS_KEY_ID in .env}
+ RUSTFS_SECRET_KEY: ${S3_SECRET_ACCESS_KEY:?set S3_SECRET_ACCESS_KEY in .env}
+ volumes:
+ - minio-data:/data
+ healthcheck:
+ test: ['CMD', 'curl', '-fsS', '-o', '/dev/null', 'http://127.0.0.1:9000/health']
+ interval: 15s
+ timeout: 5s
+ retries: 5
+ start_period: 20s
+
+ # One-shot: creates the attachments bucket, then exits. A PUT on a bucket that
+ # already exists succeeds, so it runs on every start.
+ minio-init:
+ image: rustfs/rustfs:1.0.0
+ restart: 'no'
+ depends_on:
+ minio:
+ condition: service_healthy
+ environment:
+ S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID}
+ S3_SECRET_ACCESS_KEY: ${S3_SECRET_ACCESS_KEY}
+ S3_BUCKET: ${S3_BUCKET:-planner-attachments}
+ entrypoint: >
+ /bin/sh -c "
+ curl -fsS -X PUT --aws-sigv4 aws:amz:us-east-1:s3 --user \"$$S3_ACCESS_KEY_ID:$$S3_SECRET_ACCESS_KEY\" http://minio:9000/\"$$S3_BUCKET\" &&
+ echo 'bucket ready: '\"$$S3_BUCKET\"
+ "
+
+ # One-shot: dumps the database and applies the migrations, then exits. api, worker
+ # and bot start only after it succeeds, so none of them runs against an old schema.
+ # restart 'no' keeps a finished run from being started again.
+ migrate:
+ image: ghcr.io/croffasia/itsaplan-pro-api:${VERSION:-latest}
+ restart: 'no'
+ command: ['bun', 'run', 'vendor/itsaplan/packages/db/src/migrate.ts']
+ depends_on:
+ postgres:
+ condition: service_healthy
+ environment:
+ DATABASE_URL: postgres://${POSTGRES_USER:-itsaplan}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-itsaplan}
+ # How long the dumps are kept, and the switch that upgrades without one.
+ # BACKUP_DIR is not among them: the volume below pins it.
+ BACKUP_RETENTION_DAYS: ${BACKUP_RETENTION_DAYS:-}
+ SKIP_PRE_MIGRATION_BACKUP: ${SKIP_PRE_MIGRATION_BACKUP:-}
+ # Holds the dump taken before a release's migrations, kept for
+ # BACKUP_RETENTION_DAYS (30) so a downgrade has something to restore.
+ volumes:
+ - db-backups:/backups
+
+ api:
+ image: ghcr.io/croffasia/itsaplan-pro-api:${VERSION:-latest}
+ restart: unless-stopped
+ # The image's own CMD migrates first; here the migrate service has done that.
+ command: ['./pro-api']
+ depends_on:
+ postgres:
+ condition: service_healthy
+ migrate:
+ condition: service_completed_successfully
+ minio-init:
+ condition: service_completed_successfully
+ environment:
+ NODE_ENV: production
+ API_PORT: 3000
+ DATABASE_URL: postgres://${POSTGRES_USER:-itsaplan}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-itsaplan}
+ BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET:?set BETTER_AUTH_SECRET in .env}
+ # Encrypts stored provider credentials at rest (AES-256-GCM). Changing it
+ # makes existing stored credentials undecryptable.
+ APP_ENCRYPTION_KEY: ${APP_ENCRYPTION_KEY:?set APP_ENCRYPTION_KEY in .env}
+ # Public origins, each entered once. API_URL is the api origin (auth handler,
+ # email links); APP_URL is the web origin (CORS, passkey, email links).
+ API_URL: ${API_URL:?public origin of the api, e.g. https://api.example.com}
+ APP_URL: ${APP_URL:?public origin of the web app, e.g. https://app.example.com}
+ # Set COOKIE_DOMAIN only to override the parent domain derived from
+ # APP_URL (multi-label TLDs, deep subdomains).
+ COOKIE_DOMAIN: ${COOKIE_DOMAIN:-}
+ # Where the client IP for the rate limit is read; empty reads X-Forwarded-For.
+ CLIENT_IP_HEADER: ${CLIENT_IP_HEADER:-}
+ TRUSTED_PROXIES: ${TRUSTED_PROXIES:-}
+ # Public origin for incoming Git webhooks when API_URL is private; empty uses API_URL.
+ GIT_WEBHOOK_BASE_URL: ${GIT_WEBHOOK_BASE_URL:-}
+ S3_ENDPOINT: http://minio:9000
+ S3_BUCKET: ${S3_BUCKET:-planner-attachments}
+ S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID}
+ S3_SECRET_ACCESS_KEY: ${S3_SECRET_ACCESS_KEY}
+ S3_REGION: ${S3_REGION:-us-east-1}
+ S3_FORCE_PATH_STYLE: ${S3_FORCE_PATH_STYLE:-}
+ # Hosts trusted even though they resolve privately. Also governs webhook URL
+ # validation and attachment import.
+ SSRF_ALLOWED_HOSTS: ${SSRF_ALLOWED_HOSTS:-}
+ healthcheck:
+ test: ['CMD', 'wget', '-q', '-O', '/dev/null', 'http://127.0.0.1:3000/']
+ interval: 15s
+ timeout: 5s
+ retries: 5
+ start_period: 30s
+ ports:
+ - '${API_PORT:-3000}:3000'
+
+ # Webhook delivery, notification delivery, agent schedules, and agent runs.
+ # Shares the database with the api. No public ports.
+ worker:
+ image: ghcr.io/croffasia/itsaplan-pro-worker:${VERSION:-latest}
+ restart: unless-stopped
+ depends_on:
+ postgres:
+ condition: service_healthy
+ migrate:
+ condition: service_completed_successfully
+ environment:
+ NODE_ENV: production
+ DATABASE_URL: postgres://${POSTGRES_USER:-itsaplan}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-itsaplan}
+ # Notification delivery sends email and Telegram messages itself, with the
+ # provider credentials stored in the database — encrypted with this key, the
+ # same value the api uses.
+ APP_ENCRYPTION_KEY: ${APP_ENCRYPTION_KEY:?set APP_ENCRYPTION_KEY in .env}
+ # Anonymous telemetry (TELEMETRY.md). Either variable, set to anything but 0,
+ # turns it off.
+ TELEMETRY_DISABLED: ${TELEMETRY_DISABLED:-}
+ DO_NOT_TRACK: ${DO_NOT_TRACK:-}
+ TELEMETRY_DEBUG: ${TELEMETRY_DEBUG:-}
+ # The same list the api reads. This process delivers webhooks to those hosts.
+ SSRF_ALLOWED_HOSTS: ${SSRF_ALLOWED_HOSTS:-}
+ # A downloaded Plane import attachment is stored here, the same bucket the
+ # api's own uploads use.
+ S3_ENDPOINT: http://minio:9000
+ S3_BUCKET: ${S3_BUCKET:-planner-attachments}
+ S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID}
+ S3_SECRET_ACCESS_KEY: ${S3_SECRET_ACCESS_KEY}
+ S3_REGION: ${S3_REGION:-us-east-1}
+ S3_FORCE_PATH_STYLE: ${S3_FORCE_PATH_STYLE:-}
+ # Optional tuning lives in apps/worker/src/config.ts.
+
+ # Telegram bot: long polling for the instance bot, completing the account links
+ # users start from their profile. The bot token is stored in the database and
+ # edited in god mode, so it is not an environment variable here.
+ #
+ # Must stay at one replica: Telegram hands each getUpdates call to a single
+ # caller, so a second instance would take updates away from the first.
+ bot:
+ image: ghcr.io/croffasia/itsaplan-pro-bot:${VERSION:-latest}
+ restart: unless-stopped
+ depends_on:
+ postgres:
+ condition: service_healthy
+ migrate:
+ condition: service_completed_successfully
+ environment:
+ NODE_ENV: production
+ DATABASE_URL: postgres://${POSTGRES_USER:-itsaplan}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-itsaplan}
+ APP_ENCRYPTION_KEY: ${APP_ENCRYPTION_KEY:?set APP_ENCRYPTION_KEY in .env}
+
+ # The origins are read at startup and handed to the browser by the server render,
+ # so the image carries none of them and a changed API_URL only needs a restart.
+ web:
+ image: ghcr.io/croffasia/itsaplan-pro-web:${VERSION:-latest}
+ restart: unless-stopped
+ depends_on:
+ - api
+ environment:
+ NODE_ENV: production
+ PORT: 3001
+ HOSTNAME: 0.0.0.0
+ # The api origin the browser uses.
+ API_URL: ${API_URL:?public origin of the api, e.g. https://api.example.com}
+ # Where web itself reaches the api: it streams avatars and attachments from
+ # there (/media) so they are served from the web origin.
+ SERVICE_URL_API: http://api:3000
+ # Legal document URLs shown on the logged-out screens; empty hides the notice.
+ PRIVACY_URL: ${PRIVACY_URL:-}
+ TERMS_URL: ${TERMS_URL:-}
+ # /login renders without a session, and without reaching the api.
+ healthcheck:
+ test: ['CMD', 'wget', '-q', '-O', '/dev/null', 'http://127.0.0.1:3001/login']
+ interval: 15s
+ timeout: 5s
+ retries: 5
+ start_period: 20s
+ ports:
+ - '${WEB_PORT:-3001}:3001'
+
+volumes:
+ postgres-data:
+ minio-data:
+ db-backups:
diff --git a/docs/coolify.md b/docs/coolify.md
index 5d93ea07..f5f1eb63 100644
--- a/docs/coolify.md
+++ b/docs/coolify.md
@@ -61,12 +61,14 @@ worker tuning — go in **Configuration → Environment Variables**.
## 5. Deploy the published images
-A Public Repository resource always builds from source. To run the images published to GHCR on
-each release, create the stack as a service instead:
+A Public Repository resource always builds from source. To run the images published to GHCR
+on each release, create the stack as a service instead.
1. **New Resource → Docker Compose Empty**, then pick the server.
2. Paste the whole of `docker-compose.coolify-images.yml` into **Docker Compose file** and
- press **Save**. It carries no `build:` sections — nothing is built.
+ press **Save**. It carries no `build:` sections — nothing is built. For the Pro edition,
+ paste `docker-compose.coolify-pro.yml` instead. Without a valid license the Pro images run
+ as the core does; the license key is entered in god mode, under **License**.
3. In **Environment Variables**, set `VERSION` to a release (e.g. `0.10.1`); leave it out for
the newest.
4. Press **Deploy**. Coolify generates a domain for api and one for web on the first
diff --git a/docs/helm.md b/docs/helm.md
index 4e3745a6..4b1d6d97 100644
--- a/docs/helm.md
+++ b/docs/helm.md
@@ -33,6 +33,13 @@ Install the chart:
helm install itsaplan charts/itsaplan -f values.yaml
```
+For the Pro edition, pass `charts/itsaplan/values-pro.yaml` before it. Without a valid license
+the Pro images run as the core does; the license key is entered in god mode, under **License**.
+
+```bash
+helm install itsaplan charts/itsaplan -f charts/itsaplan/values-pro.yaml -f values.yaml
+```
+
Each API pod applies the database migrations in its `migrate` init container before the server starts. With several replicas, one applies them and the others wait on a Postgres advisory lock. Worker and bot pods wait in their own init container until the migrations are applied. The first account registered becomes the instance admin.
## What gets deployed
diff --git a/docs/self-hosting.md b/docs/self-hosting.md
index fb6df524..3115bc15 100644
--- a/docs/self-hosting.md
+++ b/docs/self-hosting.md
@@ -36,6 +36,12 @@ run from the images published on each release. `VERSION` in `.env` pins one rele
of the newest. The `migrate` service applies migrations before the api starts, and the first account you register
becomes the instance admin.
+For the Pro edition, start the stack with `docker compose -f docker-compose.pro.yml up -d`.
+It takes the same `.env` and runs the Pro images. Without a valid license they run as the core
+does; the license key is entered in god mode, under **License**. The project name and the
+volumes are those of `docker-compose.yml`, so an existing instance moves to Pro on the same
+data.
+
`.env.example` documents every variable, including the optional ones: legal document URLs,
passkey and cookie settings, telemetry opt-out, and worker tuning.