shell-deploy
shell-deploy automates containerization of shell script applications by detecting the entry point (start.sh), identifying the shell interpreter from shebang lines, executing optional setup scripts during Docker builds, and generating appropriate Dockerfiles. Use this skill when deploying projects with shell script entry points or when start.sh is present in the root directory.
git clone --depth 1 https://github.com/nixopus/nixopus /tmp/shell-deploy && cp -r /tmp/shell-deploy/api/skills/shell-deploy ~/.claude/skills/shell-deploySKILL.md
# Shell Script Deployment ## Detection Project is a shell script application if `start.sh` exists in the root directory. ## Shell Interpreter Detected from the shebang line of the entry script: | Shell | Shebang | Notes | |---|---|---| | bash | `#!/bin/bash` | Available in base image | | sh | `#!/bin/sh` | Available in base image | | dash | `#!/bin/dash` | Uses sh in base image | | zsh | `#!/bin/zsh` | Must be installed in Dockerfile | No shebang defaults to `sh`. ## Setup Scripts If a `setup.sh` file exists alongside `start.sh`, it runs during the Docker build to prepare the environment (install tools, generate config, etc.). Files created by the setup script are available at runtime. ## Dockerfile Patterns ### Basic ```dockerfile FROM debian:bookworm-slim RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY start.sh . RUN chmod +x start.sh EXPOSE 8080 CMD ["./start.sh"] ``` ### With setup script ```dockerfile FROM debian:bookworm-slim RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY . . RUN chmod +x start.sh setup.sh RUN ./setup.sh EXPOSE 8080 CMD ["./start.sh"] ```
Reference for all Nixopus API operations callable via nixopus_api(method, path, body)
Generate Caddyfile configurations for static sites and reverse proxies — SPA fallback routing, cache headers, compression, redirects, and error pages. Use when deploying a static site that needs custom Caddy configuration, or when the user needs SPA routing, caching, or redirect rules.
Generate docker-compose.yml for multi-service setups including databases, caches, and service dependencies. Use when the app needs a database, cache, message broker, or has multiple independently deployable services.
Size container memory and CPU limits, diagnose OOM kills and CPU throttling, and recommend resource adjustments by ecosystem. Use when containers are being OOM-killed, running slowly, or when setting initial resource limits for a deployment.
Build and deploy C/C++ applications — CMake, Meson, Ninja, and Dockerfile patterns. Use when deploying a C or C++ project, or when CMakeLists.txt or meson.build is detected.
Run database migrations safely during deployment — framework-specific commands, pre-deploy vs post-deploy timing, health gates, and rollback strategies. Use when the app has a database migration system and needs migrations run during deployment.
Build and deploy Deno applications — version detection, dependency caching, and Dockerfile patterns. Use when deploying a Deno project, or when deno.json or deno.jsonc is detected.
Sub-agent routing table — which agent handles diagnostics, machine health, infrastructure, GitHub, billing, and notifications. Load when the current task is not a direct deployment.