- Home
- Skills
- DevOps & Cloud
- Docker Compose + Nginx + TLS Runbook for a Trading Bot
Docker Compose + Nginx + TLS Runbook for a Trading Bot
Ops runbook for a dockerised trading bot with nginx and TLS: diagnose a dead site, renew certificates, serve by bare IP as a fallback, deploy without disturbing a live scheduler, and harden nginx headers and sshd.
$5
What it does
- Ops runbook for a dockerised trading bot behind nginx and TLS
- Diagnoses a site that does not open, read-only first
- Renews certificates and can serve the app by IP address without touching other hosts
Docker Compose + Nginx + TLS Runbook for a Trading Bot
Example session with this skill installed
My trading bot's web UI shows a certificate error and I need to deploy a backend fix today. What do you check first, and how do you deploy without restarting the scheduler during the settlement window?
- Read your context and instructions
- Compiled the docker compose
Example on a fictional setup (server your-prod-host, domain example.com, compose project bot).
Diagnosis, read-only, in order:
- DNS: dig +short example.com A returns the server IP, so DNS is fine.
- Certificate: openssl x509 -noout -dates on the live fullchain file inside the nginx container shows notAfter in the past. Verdict: expired certificate, not a dead domain.
- Renewal automation: /etc/cron.d has no certbot entry, which explains why nothing renewed.
Fix: certbot renew --dry-run first (changes no real certificate), then certbot renew, then nginx -t and nginx -s reload. Add a twice-daily cron with a reload deploy-hook. If the domain must stay unusable for a while, make_ip_overlay.sh 203.0.113.10 prints an IP-only nginx block as a fallback.
Deploy plan, nothing executed yet:
- Precondition: outside the settlement window and a read-only query for running jobs returns [].
- Back up the SQLite DB with the backup API into backups/.
- git pull --ff-only, docker compose build backend, then docker compose up -d --no-deps backend. Never a bare up -d, which can recreate the scheduler.
- Reload nginx so it re-resolves the new backend IP; verify health, a 401 on a protected route, and the startup log line.
Connects securely to your tools. The creator never sees your data.
About this skill
A trading bot's web UI going down is rarely a mystery once you check in the right order, but a careless fix (a bare docker compose up -d) can recreate the scheduler at the worst moment. This skill is the runbook for a docker compose stack of backend, frontend and nginx on a shared Linux server.
What is inside:
- SKILL.md - connecting safely; how domain and TLS are typically wired; diagnosing "the site does not open" read-only and in order (expired certificate versus dead DNS versus stopped container); renewing the Let's Encrypt certificate with a dry run first; serving by bare IP as a temporary fallback; deploying backend and frontend from main with preconditions (outside your critical window, no job running), a consistent SQLite backup with the backup API, and why --no-deps matters; security headers and sshd hardening without locking yourself out; other gotchas; and an Adapt-to-your-setup section.
- templates/make_ip_overlay.sh - prints an nginx overlay that serves the app by IP address, matching the IP host only and never adding default_server. Run with --help for usage.
Who it is for: solo operators who run a bot and its UI on their own server. It assumes docker compose, nginx and certbot, and a SQLite database in the example. Placeholders such as your-prod-host and /srv/bot are replaced in the setup section. It is also part of the Production Ops: DB, Scrapers, Trading Bot pack at a lower per-skill price.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 day ago
- Software
- Claude Codeora compatible agent runtimeSSH access to your own Linux serverDocker and docker compose on that serverA domain with Let's Encrypt certificates
Permissions
What's inside
Frequently Asked Questions
New in DevOps & Cloud
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.