跳到主要内容

Docker Vps Ship

Ship starters via Docker Compose on a VPS.

Skill metadata​

SourceOptional — install with vibeos skills install official/devops/docker-vps-ship
Pathoptional-skills/devops/docker-vps-ship
Version1.0.0
AuthorVibeOS
LicenseMIT
Platformslinux, macos
Tagsdocker, compose, vps, deploy, internet, rsync
Related skillsdeploy-presets, internet-starter, docker-management, ship-web-service

Reference: full SKILL.md​

信息

The following is the complete skill definition that VibeOS loads when this skill is triggered. This is what the agent sees as instructions when the skill is active.

Docker VPS Ship

Take an internet-starter app to a VPS with Docker Compose: sync files, compose up --build, wait for health. Complements deploy-presets with an explicit remote ship recipe + health waiter script.

When to Use​

  • User has SSH access to a VPS (Timeweb, Hetzner, etc.)
  • Prefer containers over Fly/Cloudflare Workers
  • After local vibeos project servers + network assert are green

Prerequisites​

  • Docker + Compose on the remote host
  • SSH key or password (from .env / ssh-agent — never invent)
  • Install: vibeos skills install official/devops/docker-vps-ship
  • Local health already OK

How to Run​

  1. Ensure Dockerfile (+ optional docker-compose.yml) exist — FastAPI starter includes a Dockerfile; Compose template from deploy-presets is fine.
  2. Sync to the VPS (adjust user/host/path):
rsync -az --delete \
--exclude .venv --exclude node_modules --exclude .git --exclude .env \
./ user@vps:/opt/my-app/
# copy secrets separately
scp .env user@vps:/opt/my-app/.env
  1. Remote up + wait:
ssh user@vps 'cd /opt/my-app && docker compose up --build -d'
# from this skill:
python3 scripts/compose_health_wait.py \
--url http://127.0.0.1:8000/health --timeout 90
# or probe the public URL if published:
python3 …/browser-network-assert/scripts/assert_network.py \
--probe https://api.example.com/health --require-ok /health

For fullstack: publish both API and web (or reverse-proxy) and probe both health URLs.

Quick Reference​

StepSurface
Local greenvibeos project servers --health
Syncrsync / scp (no .env in git)
Updocker compose up --build -d
Waitcompose_health_wait.py
Assertbrowser-network-assert

Procedure​

  1. Confirm compose binds the intended host ports (or reverse-proxy).
  2. Never rsync .env from an example with fake secrets into prod blindly — use host secrets.
  3. After up, wait for health before announcing the URL.
  4. Prefer staging path/host first when a staging VPS exists.

Pitfalls​

  • Do not docker compose down -v on prod without explicit approval.
  • Firewall: open only 80/443 publicly when possible; keep app ports internal.
  • Fullstack Next needs a production image — document build if missing.

Verification​

  • compose_health_wait.py exits 0 for each --url.
  • Public (or SSH-tunnel) health returns 2xx.