Skip to main content

Command menu

Jump to a page or search the catalog

AI Tools & Scripts

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.00

What you get: 1 file · 7.26 KB · ZIP

See purchase options

Product description

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.

Example request

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?

Example result

Example on a fictional setup (server your-prod-host, domain example.com, compose project bot).

Diagnosis, read-only, in order: 1. DNS: dig +short example.com A returns the server IP, so DNS is fine. 2. 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. 3. 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.

Requirements

  • Claude Code or a compatible agent runtime
  • SSH access to your own Linux server
  • Docker and docker compose on that server
  • A domain with Let's Encrypt certificates

How to install

Unzip into your Claude Code skills folder (~/.claude/skills/ or .claude/skills/ in a project) and start a new session; the skill loads by its description.

What you get

1 file · 7.26 KB

  • trading-bot-server-ops.zipZIP · 7.26 KB
LicenseCommercial use allowed
PublishedDec 3, 2026
File size7.26 KB
File formatZIP
Versionv1.0

Tags

claude codeclaude skillai agenttrading botdocker
C
Claude Workflow Lab

Frequently asked questions

Do I get access instantly?

Yes. This is a digital product - you can download it right after checkout, straight from your library.

Can I use it for commercial projects?

Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.

What's your refund policy?

You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.

What file formats and sizes will I get?

You'll download 1 file - ZIP - 7.26 KB in total.

Do I get free updates?

Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.

Price

$5.00