mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-10-28 15:51:26 +00:00
feat: direct docker-compose import into projects
POST /projects/:id/import-compose deploys a compose file straight into a project — no template row required. Well-known DB images become managed databases attached to the project network under their service name as DNS alias; other services deploy in dependency order via deployTemplateGraph. - api: extract composeToSpecs converter (shared by the template import-compose preview and the new project endpoint); fix dropped env warnings (pointer receiver); replace insertion sort with sort.Strings - cascade: database_services.project_id links graph-provisioned DBs to their project so project delete tears down runtime + row (previously leaked container + network) - cli: new `containr import` group, `import compose <project> <file|->` - mcp: containr_projects_import_compose tool - openapi + regenerated frontend types; docs snapshot + CLI.md - frontend: compose import modal on the project workspace toolbar - tests: composeToSpecs conversion, ordering, db-image map, warnings
This commit is contained in:
1 parent
dca8aaa7b3
commit
5c2f2861bd
20 files changed
+711
-60
No files matched your search
@@ -2149,6 +2149,72 @@ paths:
|
||||
deployment_id:
|
||||
type: string
|
||||
|
||||
/projects/{id}/import-compose:
|
||||
post:
|
||||
tags:
|
||||
- Projects
|
||||
summary: Deploy a docker-compose file into a project
|
||||
description: |
|
||||
Parses a docker-compose YAML document and deploys it directly into
|
||||
the project — no template row. Well-known database images
|
||||
(postgres, mysql, redis, mongo, mariadb, clickhouse, dragonfly)
|
||||
become managed databases attached to the project network under
|
||||
their service name as DNS alias; other services are created and
|
||||
deployed in dependency order. Returns the created resources plus
|
||||
any import warnings (unsupported keys, missing values).
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- compose_yaml
|
||||
properties:
|
||||
compose_yaml:
|
||||
type: string
|
||||
description: Full docker-compose YAML document (max 512 KiB)
|
||||
variables:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
plan:
|
||||
type: string
|
||||
region:
|
||||
type: string
|
||||
responses:
|
||||
'201':
|
||||
description: Stack deployed
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
resource:
|
||||
type: string
|
||||
created:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
warnings:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
'400':
|
||||
description: Invalid compose YAML or unresolved references
|
||||
'403':
|
||||
description: Access denied
|
||||
'404':
|
||||
description: Project not found
|
||||
|
||||
# Agent Onboarding Tokens
|
||||
/agent-tokens:
|
||||
post:
|
||||
|
||||
Reference in new issue
Block a user