Skip to content

ci(deploy-dev2): build the crawlproof.com image on GitHub; dev2 only pulls it - #470

Merged
ralyodio merged 1 commit into
masterfrom
ci/prebuilt-ghcr-image
Nov 23, 2026
Merged

ralyodio merged 1 commit into
masterfrom
ci/prebuilt-ghcr-image

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

The deploy workflow builds the Dockerfile on the Actions runner and pushes
ghcr.io/profullstack/crawlproof-web:. ops/selfhost/server/deploy-app.sh gains
IMAGE_REPO mode: it reads the job's short-lived GITHUB_TOKEN from ssh stdin before
the deploy gate, pulls the tag, runs compose up --no-build, pins the running image
as crawlproofcom-app:rollback and returns to it (no rebuild) if health fails.

  • build args are the three public NEXT_PUBLIC_* values (repository variables)
  • NEXT_SERVER_ACTIONS_ENCRYPTION_KEY is no longer a build arg: Next 16 reads it
    from the environment at run time first, and app.env has it
  • .env.* added to .dockerignore; dispatch refs are validated
  • the ops/selfhost copies are synced with what runs on dev2 (deploy gate,
    vault sync, mem limits, networks)

Verification plan: a build-only dispatch (deploy=false) on this branch first, then dev2's site dir is switched to IMAGE_REPO mode (backups *.bak-20261123-prebuilt), then this merges and the push deploy is watched with a 2 s process sampler on dev2 (zero build processes), site 200 and the running image's revision label = merge sha. Depends on profullstack/cli-tools#275 (merged).

🤖 Generated with Claude Code

…pulls it

The deploy workflow builds the Dockerfile on the Actions runner and pushes
ghcr.io/profullstack/crawlproof-web:<sha>. ops/selfhost/server/deploy-app.sh gains
IMAGE_REPO mode: it reads the job's short-lived GITHUB_TOKEN from ssh stdin before
the deploy gate, pulls the tag, runs compose up --no-build, pins the running image
as crawlproofcom-app:rollback and returns to it (no rebuild) if health fails.

- build args are the three public NEXT_PUBLIC_* values (repository variables)
- NEXT_SERVER_ACTIONS_ENCRYPTION_KEY is no longer a build arg: Next 16 reads it
  from the environment at run time first, and app.env has it
- .env.* added to .dockerignore; dispatch refs are validated
- the ops/selfhost copies are synced with what runs on dev2 (deploy gate,
  vault sync, mem limits, networks)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

55 finding(s)

HIGH/CRITICAL: 3 | MEDIUM: 34 | LOW: 18

Severity Rule Location
HIGH deploy-compose-from-synced-repo .github/workflows/deploy-prober.yml:63
HIGH tls-verification-disabled lib/onion.ts:50
HIGH secret-generic-credential lib/sp/platforms/facebook.ts:32
MEDIUM gha-ssh-key-secret .github/workflows/deploy-dev2.yml:183
MEDIUM gha-ssh-key-secret .github/workflows/deploy-prober.yml:44
MEDIUM js-unescaped-html-sink app/(app)/dashboard/admin/email-broadcast/EmailBroadcastForm.tsx:125
MEDIUM js-unescaped-html-sink app/(app)/dashboard/projects/[id]/autoblog/articles/[articleId]/page.tsx:214
MEDIUM js-unescaped-html-sink app/(marketing)/blog/[slug]/page.tsx:74
MEDIUM js-unescaped-html-sink app/(marketing)/blog/[slug]/page.tsx:102
MEDIUM js-unescaped-html-sink app/(marketing)/recent/page.tsx:178
MEDIUM js-unescaped-html-sink app/(marketing)/recent/page.tsx:182
MEDIUM js-unescaped-html-sink app/c/[project]/[slug]/page.tsx:76
MEDIUM js-unescaped-html-sink app/c/[project]/page.tsx:58
MEDIUM js-unescaped-html-sink app/careers.js/route.ts:228
MEDIUM js-unescaped-html-sink app/careers.js/route.ts:285
MEDIUM js-unescaped-html-sink app/layout.tsx:139
MEDIUM js-open-redirect app/login/form.tsx:40
MEDIUM js-unescaped-html-sink app/r/[token]/page.tsx:177
MEDIUM js-open-redirect app/signup/form.tsx:65
MEDIUM js-unescaped-html-sink app/surveys/[slug]/invite/page.tsx:68
MEDIUM js-unescaped-html-sink components/json-ld.tsx:8
MEDIUM js-open-redirect components/monitor-subscribe-button.tsx:41
MEDIUM js-unescaped-html-sink components/pit-footer.tsx:17
MEDIUM js-unescaped-html-sink components/report/markdown-view.tsx:16
MEDIUM js-unescaped-html-sink lib/careers/page-templates.ts:198
MEDIUM js-dynamic-code-execution lib/crawl-limits.ts:67
MEDIUM redos-nested-quantifier lib/emailMarkdown.ts:41
MEDIUM redos-nested-quantifier lib/emailMarkdown.ts:324
MEDIUM redos-nested-quantifier lib/lx/articleGen.ts:100
MEDIUM redos-nested-quantifier lib/tracker/agent-gate.ts:61
MEDIUM sh-eval-expansion ops/selfhost/server/deploy-app.sh:140
MEDIUM sh-predictable-temp-path ops/selfhost/server/setup-supabase.sh:218
MEDIUM sql-template-interpolation scripts/detect-slot-themes.ts:31
MEDIUM sql-template-interpolation scripts/purge-constructed-keywords.ts:163
MEDIUM sql-template-interpolation scripts/purge-offniche-keywords.ts:124
MEDIUM js-dynamic-code-execution scripts/test-crawl-limits.mjs:14
MEDIUM js-dynamic-code-execution scripts/test-crawl-limits.mjs:24
LOW secret-generic-credential app/(marketing)/docs/autoblog-webhook/page.tsx:156
LOW secret-generic-credential lib/sealed/migrate.ts:38
LOW secret-generic-credential lib/sp/platforms/linkedin.ts:25
LOW secret-generic-api-key tests/ads-generator-agent.test.ts:160
LOW secret-generic-api-key tests/ads-generator-agent.test.ts:187
LOW js-dynamic-code-execution tests/careers-page-templates.test.ts:21
LOW js-dynamic-code-execution tests/careers-widget-script.test.ts:19
LOW js-dynamic-code-execution tests/careers-widget-script.test.ts:69
LOW js-dynamic-code-execution tests/contract/ad-visitor-id.test.ts:51
LOW js-dynamic-code-execution tests/contract/ad-visitor-id.test.ts:52
LOW js-dynamic-code-execution tests/contract/ads-click-cooldown-redis.test.ts:20
LOW js-dynamic-code-execution tests/contract/ads-click-cooldown-redis.test.ts:24
LOW js-dynamic-code-execution tests/contract/ads-click-cooldown-redis.test.ts:25

…and 5 more. Full results in the Security tab.

Snippets are redacted; ThreatCrush never prints matched credential material.

# Secrets from logicsrc (same as the shared dev2 template): VAULT=<project>--<env>
# in deploy.env; every deploy overlays the vault onto app.env before building.
if [ -z "${VAULT:-}" ] && [ -f "$ROOT/deploy.env" ]; then
eval "$(grep -E '^(VAULT|VAULT_TEAM|VAULT_SKIP)=' "$ROOT/deploy.env" || true)"
@ralyodio
ralyodio merged commit 89a0bd8 into master Nov 23, 2026
7 checks passed
@ralyodio
ralyodio deleted the ci/prebuilt-ghcr-image branch November 23, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants