Skip to content

feat: enhance deployment scripts and documentation for Paca - #735

Merged
pikann merged 2 commits into
masterfrom
feature/enhance-one-click-deploy
Nov 13, 2026
Merged

pikann merged 2 commits into
masterfrom
feature/enhance-one-click-deploy

Conversation

@pikann

@pikann pikann commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to the one-click deploy work. Adds lightweight (managed, no Agent Runner) options next to the existing full-stack VM paths, and reorganises the README so people can pick a provider by what they need.

Full stack (VM, AI agents) Lightweight (managed, no AI agents)
AWS EC2 template (existing) New: ECS Fargate + RDS + ElastiCache + S3
Google Cloud Compute Engine (existing) New: Cloud Run + Cloud SQL + Memorystore + Cloud Storage
DigitalOcean Droplet (existing) App Platform (.do/deploy.template.yaml)
Render Blueprint (render.yaml)
Railway Template recipe (docs only)
RepoCloud Hosted (button from #544)

Changes

  • AWS lightweight (deploy/cloud/aws/paca-lite.cfn.yaml): small VPC, one Fargate task running gateway, API, web and realtime as four containers behind an Application Load Balancer; RDS Postgres, ElastiCache Valkey, S3 bucket; secrets generated in Secrets Manager (the encryption key is forced to 64 hex chars). Optional domain + ACM certificate for HTTPS. Passes cfn-lint. publish-template.sh and cd.yml now upload and attach both templates.
  • GCP lightweight (deploy/cloud/gcp/deploy-lite.sh, tutorial-lite.md): one Cloud Run service with the same four containers, Cloud SQL, Memorystore, a Cloud Storage bucket (S3 interop through an HMAC key), Secret Manager secrets, and Docker Hub images through an Artifact Registry remote repo. Safe to re-run.
  • DigitalOcean App Platform (.do/deploy.template.yaml): API and realtime services plus a Postgres dev database; the React app is a free static site. Needs an external Redis URL (dev databases are Postgres-only) and a Spaces bucket.
  • Render (render.yaml, deploy/render/gateway/Dockerfile): managed Postgres, Key Value, RustFS, API, realtime, Caddy gateway; the web app is a free static site that the gateway proxies to. The gateway Dockerfile patches the Caddyfile to forward the upstream host and fails the build if the line it patches changes.
  • Railway: setup recipe in the docs (Railway templates can only be created in its dashboard).
  • DigitalOcean Marketplace image (deploy/cloud/digitalocean/marketplace/): Packer template, first-boot script and MOTD, plus a README with build and submission steps. DigitalOcean has no link that pre-fills a cloud-init script, so a true one-click Droplet needs a Marketplace listing; until then the Droplet button opens the guide.
  • README: the one-click section is now two tables (Full stack / Lightweight) with a short "which to pick" line, instead of one row of buttons.
  • Docs (docs/deployment/one-click.md): sections and limits for every path.

Notes for review

  • Both API-based paths set AI_AGENT_INTERNAL_KEY (the API exits at startup without it) and a 64-hex ENCRYPTION_KEY.
  • STORAGE_ENDPOINT is set explicitly for S3/GCS. An empty value falls back to the bundled RustFS (env() treats empty as unset), so STORAGE_PROVIDER=s3 alone would still point at rustfs:9000. install.sh and the compose file appear to leave it empty for S3, so that may be a separate existing bug; I did not change it here.
  • Lightweight paths run one always-on instance; plugins live on ephemeral disk and are lost on restart.

Before the buttons work

  • AWS (both templates): the S3 bucket paca-cloudformation, plus either the OIDC role + AWS_ROLE_ARN/AWS_TEMPLATE_BUCKET repo variables, or a manual run of publish-template.sh. Setup steps are in the docs.
  • GCP: the Cloud Shell links clone the default branch, so this needs to be merged first.
  • All VM paths: a release that includes bootstrap.sh.
  • Railway: build the template from the recipe, then point its button at the railway.com/deploy/<code> link.
  • DigitalOcean Droplet: build and submit the Marketplace image; after approval, point the button at the listing.

Testing

Not run on any real account. Checked: cfn-lint on the AWS templates, YAML and bash syntax, the GCP Cloud Run spec rendered and parsed locally, and the Render gateway image builds with a valid Caddyfile. Still to verify on real accounts: both lightweight stacks, the App Platform spec (written without an account), the Render blueprint, and the Marketplace image build.

- Updated `publish-template.sh` to support publishing multiple CloudFormation templates for AWS.
- Added README for DigitalOcean Marketplace 1-Click image, detailing build and submission steps.
- Created `99-one-click` MOTD script for DigitalOcean to display installation information.
- Implemented `001_paca_firstboot.sh` for initial setup of Paca on new Droplets.
- Introduced Packer template `paca.pkr.hcl` for building DigitalOcean Marketplace images.
- Added Docker installation script `010-docker.sh` for setting up Docker and firewall on DigitalOcean.
- Created `020-paca.sh` to stage the first-boot installer for Paca.
- Developed `deploy-lite.sh` for lightweight deployment on Google Cloud, utilizing managed services.
- Documented lightweight deployment process for GCP in `tutorial-lite.md`.
- Added Dockerfile for Caddy gateway in Render blueprint.
- Updated deployment documentation to reflect new lightweight options for AWS, GCP, DigitalOcean, Render, and Railway.
- Created Render blueprint `render.yaml` for one-click Paca deployment.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Two fixes before merge: the Marketplace Packer template points at a script path that does not exist upstream (the image build aborts at its last provisioner), and the App Platform spec sets TRUSTED_PROXY_HOPS=2 for a topology with no gateway, so the API resolves every request to the platform router instead of the client.

Reviewed changes

  • AWS lightweight template — new paca-lite.cfn.yaml runs one Fargate task (Caddy gateway, API, web, realtime) behind an ALB with RDS, ElastiCache Valkey, S3 and Secrets Manager-generated secrets, plus optional Domain/ACM; cd.yml and publish-template.sh now upload and attach it.
  • GCP lightweight — deploy-lite.sh creates one Cloud Run service with four containers, Cloud SQL, Memorystore, a GCS bucket reached over S3 interop (HMAC) and Secret Manager secrets, pulling Docker Hub images through an Artifact Registry remote repo; safe to re-run.
  • DigitalOcean App Platform — .do/deploy.template.yaml runs API and realtime against a dev Postgres with a free static web site, platform ingress replacing Caddy, and external Redis/Spaces as prerequisites.
  • Render — render.yaml plus deploy/render/gateway/Dockerfile, which bakes the shared Caddyfile and patches its SPA upstream to forward the static site's Host.
  • DigitalOcean Marketplace image — Packer template, per-instance first-boot installer, Docker/UFW script, MOTD and submission README; still unlisted.
  • Docs and CD — README one-click section split into Full stack/Lightweight tables, per-provider sections in docs/deployment/one-click.md, a Railway recipe, and release-asset/S3 publishing for both CloudFormation templates.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Comment thread .do/deploy.template.yaml Resolved
Comment thread docs/deployment/one-click.md Resolved
Comment thread render.yaml Resolved
Comment thread render.yaml Resolved

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Reviewed the two commits since the prior Pullfrog review (8286b503 → 35cefc34): the follow-ups for the Marketplace Packer script path, the App Platform proxy-hop count and plugin directories, plus documentation of the PaaS limitations.

  • Corrected the Marketplace build script path — paca.pkr.hcl and its README now reference upstream's scripts/99-img-check.sh, so the final provisioner resolves instead of aborting the image build.
  • Fixed App Platform proxy hops — TRUSTED_PROXY_HOPS is now 1, matching the gateway-less topology, with a comment explaining that DigitalOcean reports the ingress server's address in X-Forwarded-For.
  • Added plugin directories to both PaaS specs — render.yaml and .do/deploy.template.yaml now point all four PLUGINS_*_DIR vars at the /plugins* paths the API entrypoint creates and chowns, replacing the root-owned /app/plugins/local defaults that made installs fail.
  • Documented PaaS limitations — new "Known limits" sections for App Platform and Render cover plugins, the shared client address, and the unverified RustFS disk, the last with an external-S3 fallback recipe; the duplicated ENCRYPTION_KEY paragraph in the Render section is removed.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pikann
pikann merged commit 3c9eb8a into master Nov 13, 2026
1 check passed
@pikann
pikann deleted the feature/enhance-one-click-deploy branch November 13, 2026 10:11
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.

1 participant