chore(selfhost): parameterize compose names, centralize Node version, fix license leftovers - #316
Merged
Merged
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups from a real end-to-end
setup.shself-host test (clone → docker build → boot → browser login). The flow works; these are the rough edges it surfaced.Changes
Multi-instance friendly compose —
name:and everycontainer_name:now derive fromCOMPOSE_PROJECT_NAME(defaultamcp, so existing docs anddocker exec amcp-postgres …commands are unchanged). SettingCOMPOSE_PROJECT_NAME=foonamespaces 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_URLis now overridable too.Centralized Node version — the Dockerfile repeated
node:26-alpinein all 5 stages; now declared once viaARG 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 >=22to 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:
org.opencontainers.image.licenses:BSL-1.1→AGPL-3.0-onlypackage.jsondescription: droppedSource-available (BSL-1.1 → Apache 2030)→Open source (AGPL-3.0)CITATION.cffabstract and asecrets.util.tscomment:source-available→open-sourceDocs —
.env.examplenow documentsCOMPOSE_PROJECT_NAMEand the internal-PORTvs host-BACKEND_PORTdistinction.No default-behaviour change: with no
COMPOSE_PROJECT_NAMEset, names/volumes/network are byte-identical to before.Test plan
docker compose configresolves toamcp-*by default and<name>-*whenCOMPOSE_PROJECT_NAMEis setdocker compose up --buildfrom 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 existingamcp-*stack (no collision)AGPL-3.0-only; admin registration → role ADMIN;ee/cloud module inert (onboarding route 404,DEPLOYMENT_MODEunset)BSL/source-availablereferences remain outside the intentional 'earlier BUSL releases' license notes