mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-10-28 15:51:26 +00:00
- internal/deployqueue: serialized FIFO per service — concurrent deploys of one service no longer race (the container-name-conflict failure mode); different services still run in parallel. - Deploys and rollbacks enqueue through the queue; a busy service returns status 'queued' and promotes when the active job finishes. - POST /deployments/:id/cancel — queued jobs drop immediately (200 cancelled); active jobs get ctx cancelled so build/reconcile abort (202 cancelling, settles 'cancelled'); finished deployments return 409 NOT_CANCELLABLE. - Redeploy and variables save now route through the same queue so they can't overlap a build; PUT /services/:id/variables accepts redeploy:true to apply env changes to running containers. - no_cache on deployment create plumbs BuildRequest -> BuildOptions for nixpacks, dockerfile and railpack builders. - CLI: deployments cancel, deploy --no-cache, variables set/unset --redeploy. MCP: containr_deployments_cancel; deploy/variables_set document no_cache/redeploy. UI: Cancel button + queued/cancelled badges on the deployments table. OpenAPI + types regenerated. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Railpack Integration
This directory contains the build system for Containr, with Railpack as the primary build method.
Build Types
Railpack (Primary)
- Detection: Automatically detects supported frameworks (Node.js, Python, Go, Rust, Java, Ruby, PHP, Static)
- API: Uses https://api.railpack.app/v1/ for Dockerfile generation
- Fallback: Falls back to Nixpacks if Railpack cannot build the project
Nixpacks (Secondary)
- Detection: Used as fallback when Railpack detection fails
- Local: Runs locally without external API calls
Dockerfile
- Detection: Checks for existing Dockerfile in repository
- Priority: Highest priority if Dockerfile exists
Prebuilt
- Usage: For pre-built container images
- Configuration: Specified in service configuration
Supported Frameworks
Railpack supports the following frameworks:
- Node.js - package.json detection
- Python - requirements.txt detection
- Go - go.mod detection
- Rust - Cargo.toml detection
- Java - pom.xml or build.gradle detection
- Ruby - Gemfile detection
- PHP - composer.json detection
- Static - Static site detection
Usage
// Create build manager
buildManager := build.NewBuildManager("/tmp/builds", dockerClient)
// Build a project
response, err := buildManager.Build(ctx, &types.BuildRequest{
SourcePath: "/path/to/project",
ImageName: "my-app",
ImageTag: "latest",
})
API Endpoints
- Generate Dockerfile: POST https://api.railpack.app/v1/generate
- Build Plan: POST https://api.railpack.app/v1/plan
Configuration
Railpack can be configured with:
- Custom build commands
- Custom start commands
- Environment variables
- Build root directory