mirror of https://github.com/portainer/portainer
commit
64b21d6f9c
|
@ -137,7 +137,7 @@ func (handler *Handler) createComposeStackFromGitRepository(w http.ResponseWrite
|
||||||
EntryPoint: payload.ComposeFilePathInRepository,
|
EntryPoint: payload.ComposeFilePathInRepository,
|
||||||
}
|
}
|
||||||
|
|
||||||
projectPath := handler.FileService.GetStackProjectPath(string(stack.ID))
|
projectPath := handler.FileService.GetStackProjectPath(strconv.Itoa(int(stack.ID)))
|
||||||
stack.ProjectPath = projectPath
|
stack.ProjectPath = projectPath
|
||||||
|
|
||||||
gitCloneParams := &cloneRepositoryParameters{
|
gitCloneParams := &cloneRepositoryParameters{
|
||||||
|
|
|
@ -151,7 +151,7 @@ func (handler *Handler) createSwarmStackFromGitRepository(w http.ResponseWriter,
|
||||||
Env: payload.Env,
|
Env: payload.Env,
|
||||||
}
|
}
|
||||||
|
|
||||||
projectPath := handler.FileService.GetStackProjectPath(string(stack.ID))
|
projectPath := handler.FileService.GetStackProjectPath(strconv.Itoa(int(stack.ID)))
|
||||||
stack.ProjectPath = projectPath
|
stack.ProjectPath = projectPath
|
||||||
|
|
||||||
gitCloneParams := &cloneRepositoryParameters{
|
gitCloneParams := &cloneRepositoryParameters{
|
||||||
|
|
|
@ -484,7 +484,7 @@ type (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// APIVersion is the version number of the Portainer API.
|
// APIVersion is the version number of the Portainer API.
|
||||||
APIVersion = "1.18.0"
|
APIVersion = "1.18.1"
|
||||||
// DBVersion is the version number of the Portainer database.
|
// DBVersion is the version number of the Portainer database.
|
||||||
DBVersion = 12
|
DBVersion = 12
|
||||||
// DefaultTemplatesURL represents the default URL for the templates definitions.
|
// DefaultTemplatesURL represents the default URL for the templates definitions.
|
||||||
|
|
|
@ -54,7 +54,7 @@ info:
|
||||||
|
|
||||||
**NOTE**: You can find more information on how to query the Docker API in the [Docker official documentation](https://docs.docker.com/engine/api/v1.30/) as well as in [this Portainer example](https://gist.github.com/deviantony/77026d402366b4b43fa5918d41bc42f8).
|
**NOTE**: You can find more information on how to query the Docker API in the [Docker official documentation](https://docs.docker.com/engine/api/v1.30/) as well as in [this Portainer example](https://gist.github.com/deviantony/77026d402366b4b43fa5918d41bc42f8).
|
||||||
|
|
||||||
version: "1.18.0"
|
version: "1.18.1"
|
||||||
title: "Portainer API"
|
title: "Portainer API"
|
||||||
contact:
|
contact:
|
||||||
email: "info@portainer.io"
|
email: "info@portainer.io"
|
||||||
|
@ -1386,7 +1386,7 @@ paths:
|
||||||
in: "path"
|
in: "path"
|
||||||
description: "Stack identifier"
|
description: "Stack identifier"
|
||||||
required: true
|
required: true
|
||||||
type: "string"
|
type: "integer"
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "Success"
|
description: "Success"
|
||||||
|
@ -1431,7 +1431,12 @@ paths:
|
||||||
in: "path"
|
in: "path"
|
||||||
description: "Stack identifier"
|
description: "Stack identifier"
|
||||||
required: true
|
required: true
|
||||||
type: "string"
|
type: "integer"
|
||||||
|
- name: "endpointId"
|
||||||
|
in: "query"
|
||||||
|
description: "Stacks created before version 1.18.0 might not have an associated endpoint identifier. Use this \
|
||||||
|
optional parameter to set the endpoint identifier used by the stack."
|
||||||
|
type: "integer"
|
||||||
- in: "body"
|
- in: "body"
|
||||||
name: "body"
|
name: "body"
|
||||||
description: "Stack details"
|
description: "Stack details"
|
||||||
|
@ -1478,7 +1483,7 @@ paths:
|
||||||
in: "path"
|
in: "path"
|
||||||
description: "Stack identifier"
|
description: "Stack identifier"
|
||||||
required: true
|
required: true
|
||||||
type: "string"
|
type: "integer"
|
||||||
- name: "external"
|
- name: "external"
|
||||||
in: "query"
|
in: "query"
|
||||||
description: "Set to true to delete an external stack. Only external Swarm stacks are supported."
|
description: "Set to true to delete an external stack. Only external Swarm stacks are supported."
|
||||||
|
@ -1528,7 +1533,7 @@ paths:
|
||||||
in: "path"
|
in: "path"
|
||||||
description: "Stack identifier"
|
description: "Stack identifier"
|
||||||
required: true
|
required: true
|
||||||
type: "string"
|
type: "integer"
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "Success"
|
description: "Success"
|
||||||
|
@ -1556,6 +1561,61 @@ paths:
|
||||||
description: "Server error"
|
description: "Server error"
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/GenericError"
|
$ref: "#/definitions/GenericError"
|
||||||
|
/stacks/{id}/migrate:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- "stacks"
|
||||||
|
summary: "Migrate a stack to another endpoint"
|
||||||
|
description: |
|
||||||
|
Migrate a stack from an endpoint to another endpoint. It will re-create
|
||||||
|
the stack inside the target endpoint before removing the original stack.
|
||||||
|
**Access policy**: restricted
|
||||||
|
operationId: "StackMigrate"
|
||||||
|
produces:
|
||||||
|
- "application/json"
|
||||||
|
parameters:
|
||||||
|
- name: "id"
|
||||||
|
in: "path"
|
||||||
|
description: "Stack identifier"
|
||||||
|
required: true
|
||||||
|
type: "integer"
|
||||||
|
- name: "endpointId"
|
||||||
|
in: "query"
|
||||||
|
description: "Stacks created before version 1.18.0 might not have an associated endpoint identifier. Use this \
|
||||||
|
optional parameter to set the endpoint identifier used by the stack."
|
||||||
|
type: "integer"
|
||||||
|
- in: "body"
|
||||||
|
name: "body"
|
||||||
|
description: "Stack migration details."
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/StackMigrateRequest"
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: "Success"
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/Stack"
|
||||||
|
400:
|
||||||
|
description: "Invalid request"
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/GenericError"
|
||||||
|
examples:
|
||||||
|
application/json:
|
||||||
|
err: "Invalid request"
|
||||||
|
403:
|
||||||
|
description: "Unauthorized"
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/GenericError"
|
||||||
|
404:
|
||||||
|
description: "Stack not found"
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/GenericError"
|
||||||
|
examples:
|
||||||
|
application/json:
|
||||||
|
err: "Stack not found"
|
||||||
|
500:
|
||||||
|
description: "Server error"
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/GenericError"
|
||||||
/users:
|
/users:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
@ -2598,7 +2658,7 @@ definitions:
|
||||||
description: "Is analytics enabled"
|
description: "Is analytics enabled"
|
||||||
Version:
|
Version:
|
||||||
type: "string"
|
type: "string"
|
||||||
example: "1.18.0"
|
example: "1.18.1"
|
||||||
description: "Portainer API version"
|
description: "Portainer API version"
|
||||||
PublicSettingsInspectResponse:
|
PublicSettingsInspectResponse:
|
||||||
type: "object"
|
type: "object"
|
||||||
|
@ -3561,6 +3621,19 @@ definitions:
|
||||||
type: "string"
|
type: "string"
|
||||||
example: "nginx:latest"
|
example: "nginx:latest"
|
||||||
description: "The Docker image associated to the template"
|
description: "The Docker image associated to the template"
|
||||||
|
StackMigrateRequest:
|
||||||
|
type: "object"
|
||||||
|
required:
|
||||||
|
- "EndpointID"
|
||||||
|
properties:
|
||||||
|
EndpointID:
|
||||||
|
type: "integer"
|
||||||
|
example: 2
|
||||||
|
description: "Endpoint identifier of the target endpoint where the stack will be relocated"
|
||||||
|
SwarmID:
|
||||||
|
type: "string"
|
||||||
|
example: "jpofkc0i9uo9wtx1zesuk649w"
|
||||||
|
description: "Swarm cluster identifier, must match the identifier of the cluster where the stack will be relocated"
|
||||||
StackCreateRequest:
|
StackCreateRequest:
|
||||||
type: "object"
|
type: "object"
|
||||||
required:
|
required:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Name: portainer
|
Name: portainer
|
||||||
Version: 1.18.0
|
Version: 1.18.1
|
||||||
Release: 0
|
Release: 0
|
||||||
License: Zlib
|
License: Zlib
|
||||||
Summary: A lightweight docker management UI
|
Summary: A lightweight docker management UI
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"author": "Portainer.io",
|
"author": "Portainer.io",
|
||||||
"name": "portainer",
|
"name": "portainer",
|
||||||
"homepage": "http://portainer.io",
|
"homepage": "http://portainer.io",
|
||||||
"version": "1.18.0",
|
"version": "1.18.1",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git@github.com:portainer/portainer.git"
|
"url": "git@github.com:portainer/portainer.git"
|
||||||
|
|
Loading…
Reference in New Issue