Skip to content

chore(selfhost): parameterize compose names, centralize Node version, fix license leftovers - #316

Merged
keysersoft merged 1 commit into
mainfrom
keysersoft/selfhost-compose-node
Jun 11, 2026
Merged

chore(selfhost): parameterize compose names, centralize Node version, fix license leftovers#316
keysersoft merged 1 commit into
mainfrom
keysersoft/selfhost-compose-node

Conversation

@keysersoft

Copy link
Copy Markdown
Contributor

Follow-ups from a real end-to-end setup.sh self-host test (clone → docker build → boot → browser login). The flow works; these are the rough edges it surfaced.

Changes

Multi-instance friendly composename: and every container_name: now derive from COMPOSE_PROJECT_NAME (default amcp, so existing docs and docker exec amcp-postgres … commands are unchanged). Setting COMPOSE_PROJECT_NAME=foo namespaces the project, network, volumes and container names, so a second stack can run on the same host without the hardcoded-name collision. NEXT_PUBLIC_API_URL is now overridable too.

Centralized Node version — the Dockerfile repeated node:26-alpine in all 5 stages; now declared once via ARG NODE_VERSION=26-alpine (kept at 26, per the deliberate bump in #155) and reused. Future bumps are one line; overridable with --build-arg NODE_VERSION=24-alpine.

Explicit Node floor — added engines.node >=22 to root package.json so the supported minimum (already stated in setup.sh / CONTRIBUTING) is machine-readable and consistent with the image.

License-migration leftovers missed by #314/#315:

  • Dockerfile OCI label org.opencontainers.image.licenses: BSL-1.1AGPL-3.0-only
  • package.json description: dropped Source-available (BSL-1.1 → Apache 2030)Open source (AGPL-3.0)
  • CITATION.cff abstract and a secrets.util.ts comment: source-availableopen-source

Docs.env.example now documents COMPOSE_PROJECT_NAME and the internal-PORT vs host-BACKEND_PORT distinction.

No default-behaviour change: with no COMPOSE_PROJECT_NAME set, names/volumes/network are byte-identical to before.

Test plan

  • docker compose config resolves to amcp-* by default and <name>-* when COMPOSE_PROJECT_NAME is set
  • Full docker compose up --build from the working tree on an isolated project (COMPOSE_PROJECT_NAME=amcptest, ports 3100/4100): image builds on Node 26, app+postgres healthy, runs side-by-side with the existing amcp-* stack (no collision)
  • Built image's OCI license label = AGPL-3.0-only; admin registration → role ADMIN; ee/ cloud module inert (onboarding route 404, DEPLOYMENT_MODE unset)
  • Backend suite: 173 suites / 3028 tests pass
  • Repo-wide sweep: no BSL/source-available references remain outside the intentional 'earlier BUSL releases' license notes

… fix license leftovers

- docker-compose.yml: derive project/container names from COMPOSE_PROJECT_NAME
  (default amcp, so existing docs/commands keep working) so multiple stacks can
  run on one host without collisions; make NEXT_PUBLIC_API_URL overridable
- Dockerfile: declare the Node version once via ARG NODE_VERSION and reuse it
  across all stages (was node:26-alpine duplicated 5x)
- package.json: add explicit engines.node >=22; drop stale BSL line from the
  description
- Fix license-migration leftovers missed by #314/#315: Dockerfile OCI label
  (BSL-1.1 -> AGPL-3.0-only), CITATION.cff abstract and a secrets.util.ts
  comment (source-available -> open-source)
- .env.example: document COMPOSE_PROJECT_NAME and the internal PORT vs host
  BACKEND_PORT distinction
@keysersoft
keysersoft merged commit 9548baa into main Jun 11, 2026
12 checks passed
@keysersoft
keysersoft deleted the keysersoft/selfhost-compose-node branch June 11, 2026 19:43
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant