production-deploy

Manage Docker and nginx production deployments behind Cloudflare with inode-safe editing and cache handling.

Updated Sep 9, 2026
One-click install
npx skills add https://github.com/luckybbjason1/trading --skill production-deploy-luckybbjason1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: production-deploy
Source: https://github.com/luckybbjason1/trading/tree/main/.hermes/skills/production-deploy
Command: npx skills add https://github.com/luckybbjason1/trading --skill production-deploy-luckybbjason1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Production web deployments break in non-obvious ways: sed -i silently breaks Docker bind mounts, container recreation wipes runtime files, and CDN caches serve stale assets. This Skill provides operational guardrails and verified workflows for safely editing live Docker + nginx/Caddy sites behind Cloudflare. ## Core Features & Use Cases - Pitfall Prevention: Detects and avoids the five fatal traps—Docker recreate wiping runtime files, sed -i inode breakage on bind mounts, CDN cache staleness, CSP breakages, and business-rule violations. - Safe Edit Workflows: Provides inode-preserving Python truncate-and-write edits, backup conventions (.bak-{timestamp}), nginx config reload flows, and docker commit image pinning with pull_policy: never. - SSH & Verification Procedures: Covers secure SSH key handling (heredoc, never write_file), post-change verification with curl header checks, API health probes, and headless Chrome screenshots. - Use Case: You need to update the landing page of a live site served by an nginx container with bind-mounted static files behind Cloudflare. The Skill guides you to back up, edit in-place preserving the inode, verify inside the container, and bust CDN cache with new asset filenames. ## Quick Start Use the production-deploy skill to safely update the index.html on my live Docker nginx site behind Cloudflare without breaking the bind mount.

Frequently Asked Questions about production-deploy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I edit files in a Docker bind mount without breaking it?

Avoid `sed -i`, which creates a new inode invisible to the container. Use Python truncate-and-write to preserve the inode, or edit the file and run `docker restart <container>` to re-resolve the mount without recreating it.

Why does my site break after docker compose up -d?

Recreating the container wipes runtime files injected via `docker cp`, such as custom CSS, JS, or HTML. Fix by committing a custom image, setting `pull_policy: never` in compose, and bind-mounting static files live from the host.

How do I bust Cloudflare cache for static assets?

Cloudflare caches static files by filename, so renaming images, CSS, or JS files forces a fresh fetch. Dynamic pages are typically not cached, so HTML changes appear immediately; check the `cf-cache-status` header to confirm.

What is the safe way to update nginx config inside a container?

Copy the config out with `docker cp`, edit it, copy it back, then run `nginx -t` and `nginx -s reload` inside the container. Finally `docker commit` the container to a new image tag and update docker-compose.yml to reference it.

Why should SSH private keys never be written with a file-writing tool?

File-writing tools can collapse multi-line PEM content into a single line, corrupting the key. Always write keys via terminal heredoc (`cat > ~/.ssh/id_proj << 'EOF'`), set `chmod 600`, and verify with a simple command like `whoami` before production work.