mit einem Klick
cpp-deploy
// 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.
// 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.
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.
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.
| name | cpp-deploy |
| description | 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. |
| metadata | {"version":"1.0"} |
Project is C/C++ if CMakeLists.txt or meson.build exists in the root.
Latest CMake (or Meson) and Ninja installed during build. No explicit version pinning by default.
./build (or /build)Executable name matches the project root directory name, located in the build directory.
Example: project my_app/ → ./build/my_app or /build/my_app.
/build (or ./build)| File | Build system |
|---|---|
CMakeLists.txt | CMake |
meson.build | Meson |
Both use Ninja as the default generator/backend.
Copy in order:
CMakeLists.txt or meson.buildmeson.options (Meson)src/, include/, or full source tree| Stage | Image |
|---|---|
| Build | gcc or clang + CMake/Meson + Ninja |
| Runtime | debian:bookworm-slim or alpine (copy binary only) |
FROM gcc:13-bookworm AS build
RUN apt-get update && apt-get install -y cmake ninja-build && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY CMakeLists.txt ./
COPY src src
RUN cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release && cmake --build build
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates libstdc++6 && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build /app/build/my_app .
EXPOSE 8080
CMD ["./my_app"]
FROM gcc:13-bookworm AS build
RUN apt-get update && apt-get install -y meson ninja-build && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY meson.build meson.options* ./
COPY src src
RUN meson setup build -Dbuildtype=release && ninja -C build
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates libstdc++6 && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build /app/build/my_app .
EXPOSE 8080
CMD ["./my_app"]