mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-19 20:44:16 +02:00
## Thinking Path > - Paperclip can run through Docker Compose. > - Approval-gated tools need an independent signing secret. > - The guide sets that secret before starting Compose. > - Neither Compose file passes it into the container. > - This pull request forwards the operator's configured secret. > - Documented setup can issue signed tool-action approvals. ## Linked Issues or Issue Description Fixes: #15064 ## What Changed - Forward PAPERCLIP_TOOL_ACTION_SIGNING_SECRET in both shipped Compose environments. - Document persistent deployment secrets and reuse on restart. - Explain that it is independent from the session secret. - Keep an empty default so deployments without approval-gated tools retain their existing startup behavior. ## Verification - Docker Compose config before the fix drops a supplied synthetic secret in both files. - After the fix, both preserve the supplied value. - Both also resolve successfully when the optional signing secret is absent. - Used --env-file /dev/null and synthetic values. No containers were started. - `node --test scripts/docker-compose-secrets.test.mjs`: 2 passed. - The Docker context CI lane runs this integration test. - git diff --check passes. ## Risks The value is visible to the container as intended. Operators must protect it as a secret. This does not change admission rules or require a new startup value for existing deployments. ## Model Used OpenAI Codex, based on GPT-6, assisted with source review, implementation and local test execution. The exact deployment model ID and context-window size are not exposed in this session. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass (targeted local checks and full remote CI pass) - [x] I have added or updated tests where applicable (Hermes regression / real Compose interpolation checks) - [x] I have updated relevant documentation to reflect my changes (Hermes has no configuration changes; Compose documentation is updated) - [x] I have considered and documented any risks above - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge
54 lines
1.8 KiB
YAML
54 lines
1.8 KiB
YAML
services:
|
|
db:
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_USER: paperclip
|
|
POSTGRES_PASSWORD: paperclip
|
|
POSTGRES_DB: paperclip
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U paperclip -d paperclip"]
|
|
interval: 2s
|
|
timeout: 5s
|
|
retries: 30
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
|
|
server:
|
|
build:
|
|
context: ..
|
|
dockerfile: Dockerfile
|
|
# No `init: true` here on purpose. The image makes tini PID 1 itself
|
|
# (Dockerfile ENTRYPOINT), which covers every launch path -- compose, plain
|
|
# `docker run`, the quadlet units and the ECS task definition -- instead of
|
|
# one lever per orchestrator. Setting it here too would nest docker-init
|
|
# around tini and make tini warn that it is not PID 1 on every boot.
|
|
# pids_limit is the backstop: if something ever does leak processes again,
|
|
# this container hits its own ceiling and dies visibly rather than starving
|
|
# the whole host of pids.
|
|
pids_limit: 2048
|
|
# Includes the shared 30s adapter-settlement window and final cleanup.
|
|
stop_grace_period: 90s
|
|
ports:
|
|
- "3100:3100"
|
|
environment:
|
|
DATABASE_URL: postgres://paperclip:paperclip@db:5432/paperclip
|
|
PORT: "3100"
|
|
SERVE_UI: "true"
|
|
PAPERCLIP_DEPLOYMENT_MODE: "authenticated"
|
|
PAPERCLIP_DEPLOYMENT_EXPOSURE: "private"
|
|
PAPERCLIP_PUBLIC_URL: "${PAPERCLIP_PUBLIC_URL:-http://localhost:3100}"
|
|
BETTER_AUTH_SECRET: "${BETTER_AUTH_SECRET:?BETTER_AUTH_SECRET must be set}"
|
|
# Independent secret for signed approval-gated tool actions.
|
|
PAPERCLIP_TOOL_ACTION_SIGNING_SECRET: "${PAPERCLIP_TOOL_ACTION_SIGNING_SECRET:-}"
|
|
volumes:
|
|
- paperclip-data:/paperclip
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
pgdata:
|
|
paperclip-data:
|