Compare commits
3 Commits
test/node_
...
feat/ee-83
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea5a680167 | ||
|
|
62f18d5c45 | ||
|
|
6f14132bf3 |
16
.github/ISSUE_TEMPLATE.md
vendored
16
.github/ISSUE_TEMPLATE.md
vendored
@@ -28,15 +28,17 @@ Briefly describe the problem you are having in a few paragraphs.
|
||||
|
||||
**Steps to reproduce the issue:**
|
||||
|
||||
1. 2. 3.
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?
|
||||
|
||||
**Technical details:**
|
||||
|
||||
- Portainer version:
|
||||
- Target Docker version (the host/cluster you manage):
|
||||
- Platform (windows/linux):
|
||||
- Command used to start Portainer (`docker run -p 9443:9443 portainer/portainer`):
|
||||
- Target Swarm version (if applicable):
|
||||
- Browser:
|
||||
* Portainer version:
|
||||
* Target Docker version (the host/cluster you manage):
|
||||
* Platform (windows/linux):
|
||||
* Command used to start Portainer (`docker run -p 9000:9000 portainer/portainer`):
|
||||
* Target Swarm version (if applicable):
|
||||
* Browser:
|
||||
|
||||
3
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
3
.github/ISSUE_TEMPLATE/Bug_report.md
vendored
@@ -4,6 +4,7 @@ about: Create a bug report
|
||||
title: ''
|
||||
labels: bug/need-confirmation, kind/bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
@@ -45,7 +46,7 @@ You can see how [here](https://documentation.portainer.io/archive/1.23.2/faq/#ho
|
||||
- Docker version (managed by Portainer):
|
||||
- Kubernetes version (managed by Portainer):
|
||||
- Platform (windows/linux):
|
||||
- Command used to start Portainer (`docker run -p 9443:9443 portainer/portainer`):
|
||||
- Command used to start Portainer (`docker run -p 9000:9000 portainer/portainer`):
|
||||
- Browser:
|
||||
- Use Case (delete as appropriate): Using Portainer at Home, Using Portainer in a Commerical setup.
|
||||
- Have you reviewed our technical documentation and knowledge base? Yes/No
|
||||
|
||||
@@ -91,7 +91,7 @@ Then build and run the project:
|
||||
$ yarn start
|
||||
```
|
||||
|
||||
Portainer can now be accessed at <https://localhost:9443>.
|
||||
Portainer can now be accessed at <http://localhost:9000>.
|
||||
|
||||
Find more detailed steps at <https://documentation.portainer.io/contributing/instructions/>.
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -59,8 +58,8 @@ func (manager *ComposeStackManager) Up(ctx context.Context, stack *portainer.Sta
|
||||
return errors.Wrap(err, "failed to create env file")
|
||||
}
|
||||
|
||||
filePaths := getStackFiles(stack)
|
||||
err = manager.deployer.Deploy(ctx, stack.ProjectPath, url, stack.Name, filePaths, envFilePath)
|
||||
filePaths := append([]string{stack.EntryPoint}, stack.AdditionalFiles...)
|
||||
return manager.deployer.Deploy(ctx, stack.ProjectPath, url, stack.Name, filePaths, envFilePath)
|
||||
return errors.Wrap(err, "failed to deploy a stack")
|
||||
}
|
||||
|
||||
@@ -74,9 +73,9 @@ func (manager *ComposeStackManager) Down(ctx context.Context, stack *portainer.S
|
||||
defer proxy.Close()
|
||||
}
|
||||
|
||||
filePaths := getStackFiles(stack)
|
||||
err = manager.deployer.Remove(ctx, stack.ProjectPath, url, stack.Name, filePaths)
|
||||
return errors.Wrap(err, "failed to remove a stack")
|
||||
filePaths := append([]string{stack.EntryPoint}, stack.AdditionalFiles...)
|
||||
|
||||
return manager.deployer.Remove(ctx, stack.ProjectPath, url, stack.Name, filePaths)
|
||||
}
|
||||
|
||||
// NormalizeStackName returns a new stack name with unsupported characters replaced
|
||||
@@ -117,27 +116,3 @@ func createEnvFile(stack *portainer.Stack) (string, error) {
|
||||
|
||||
return "stack.env", nil
|
||||
}
|
||||
|
||||
// getStackFiles returns list of stack's confile file paths.
|
||||
// items in the list would be sanitized according to following criterias:
|
||||
// 1. no empty paths
|
||||
// 2. no "../xxx" paths that are trying to escape stack folder
|
||||
// 3. no dir paths
|
||||
// 4. root paths would be made relative
|
||||
func getStackFiles(stack *portainer.Stack) []string {
|
||||
paths := make([]string, 0, len(stack.AdditionalFiles)+1)
|
||||
|
||||
for _, p := range append([]string{stack.EntryPoint}, stack.AdditionalFiles...) {
|
||||
if strings.HasPrefix(p, "/") {
|
||||
p = `.` + p
|
||||
}
|
||||
|
||||
if p == `` || p == `.` || strings.HasPrefix(p, `..`) || strings.HasSuffix(p, string(filepath.Separator)) {
|
||||
continue
|
||||
}
|
||||
|
||||
paths = append(paths, p)
|
||||
}
|
||||
|
||||
return paths
|
||||
}
|
||||
|
||||
@@ -64,21 +64,3 @@ func Test_createEnvFile(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_getStackFiles(t *testing.T) {
|
||||
stack := &portainer.Stack{
|
||||
EntryPoint: "./file", // picks entry point
|
||||
AdditionalFiles: []string{
|
||||
``, // ignores empty string
|
||||
`.`, // ignores .
|
||||
`..`, // ignores ..
|
||||
`./dir/`, // ignrores paths that end with trailing /
|
||||
`/with-root-prefix`, // replaces "root" based paths with relative
|
||||
`./relative`, // keeps relative paths
|
||||
`../escape`, // prevents dir escape
|
||||
},
|
||||
}
|
||||
|
||||
filePaths := getStackFiles(stack)
|
||||
assert.ElementsMatch(t, filePaths, []string{`./file`, `./with-root-prefix`, `./relative`})
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ type Handler struct {
|
||||
}
|
||||
|
||||
// @title PortainerCE API
|
||||
// @version 2.9.0
|
||||
// @version 2.6.3
|
||||
// @description.markdown api-description.md
|
||||
// @termsOfService
|
||||
|
||||
|
||||
@@ -1455,7 +1455,7 @@ type (
|
||||
|
||||
const (
|
||||
// APIVersion is the version number of the Portainer API
|
||||
APIVersion = "2.9.0"
|
||||
APIVersion = "2.6.3"
|
||||
// DBVersion is the version number of the Portainer database
|
||||
DBVersion = 32
|
||||
// ComposeSyntaxMaxVersion is a maximum supported version of the docker compose syntax
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<span class="small text-muted">
|
||||
<p>
|
||||
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px;"></i>
|
||||
This is a first version for Helm charts, for more information see this <a href="https://www.portainer.io/blog/portainer-now-with-helm-support" target="_blank">blog post</a>.
|
||||
This is a first version for Helm charts, for more information see this <a href="#">blog post.</a>
|
||||
</p>
|
||||
</span>
|
||||
</information-panel>
|
||||
|
||||
@@ -130,8 +130,8 @@
|
||||
<div class="form-group">
|
||||
<span class="col-sm-12 text-muted small">
|
||||
<p>
|
||||
Allows you to create an environment that can be registered with an Edge agent. The Edge agent will initiate the communications with the Portainer instance. All
|
||||
the required information on how to connect an Edge agent to this environment will be available after environment creation.
|
||||
Allows you to create an environment that can be registered with an Edge agent. The Edge agent will initiate the communications with the Portainer instance. All the
|
||||
required information on how to connect an Edge agent to this environment will be available after environment creation.
|
||||
</p>
|
||||
<p> You can read more about the Edge agent in the userguide available <a href="https://downloads.portainer.io/edge_agent_guide.pdf">here.</a> </p>
|
||||
</span>
|
||||
@@ -309,7 +309,7 @@
|
||||
class="form-control"
|
||||
name="endpoint_url"
|
||||
ng-model="formValues.URL"
|
||||
placeholder="e.g. 10.0.0.10:9443 or portainer.mydomain.com"
|
||||
placeholder="e.g. 10.0.0.10:9000 or portainer.mydomain.com"
|
||||
required
|
||||
data-cy="endpointCreate-portainerServerUrlInput"
|
||||
/>
|
||||
|
||||
@@ -6,7 +6,6 @@ VOLUME /data
|
||||
WORKDIR /
|
||||
|
||||
EXPOSE 9000
|
||||
EXPOSE 9443
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/portainer"]
|
||||
|
||||
@@ -6,7 +6,6 @@ VOLUME /data
|
||||
WORKDIR /
|
||||
|
||||
EXPOSE 9000
|
||||
EXPOSE 9443
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/portainer"]
|
||||
|
||||
@@ -2,7 +2,6 @@ FROM ubuntu:20.04
|
||||
|
||||
# Expose port for the Portainer UI and Edge server
|
||||
EXPOSE 9000
|
||||
EXPOSE 9443
|
||||
EXPOSE 8000
|
||||
|
||||
WORKDIR /src/portainer
|
||||
|
||||
@@ -19,7 +19,6 @@ USER ContainerAdministrator
|
||||
COPY dist /
|
||||
|
||||
EXPOSE 9000
|
||||
EXPOSE 9443
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/portainer.exe"]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Portainer.io",
|
||||
"name": "portainer",
|
||||
"homepage": "http://portainer.io",
|
||||
"version": "2.9.0",
|
||||
"version": "2.6.3",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:portainer/portainer.git"
|
||||
@@ -20,8 +20,8 @@
|
||||
"build": "grunt clean:all && grunt build",
|
||||
"build:server": "grunt clean:server && grunt build:server",
|
||||
"build:client": "grunt clean:client && grunt build:client",
|
||||
"prebuild:docs": "go install github.com/swaggo/swag/cmd/swag@v1.7.1",
|
||||
"build:docs": "cd api && swag init -g ./http/handler/handler.go --parseDependency --parseInternal --parseDepth 2 --markdownFiles ./",
|
||||
"prebuild:docs": "(! command -v swag &> /dev/null) && go get -u github.com/swaggo/swag/cmd/swag",
|
||||
"build:docs": "cd api && swag init -g ./http/handler/handler.go --markdownFiles ./",
|
||||
"clean": "grunt clean:all",
|
||||
"start": "grunt start",
|
||||
"start:clean": "grunt clean:all && grunt start",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"projectId": "cgz5j5",
|
||||
"baseUrl": "https://localhost:9443",
|
||||
"baseUrl": "http://localhost:9000",
|
||||
"video": false,
|
||||
"experimentalNetworkStubbing": true
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ describe('startContainerController', function () {
|
||||
Ports: [
|
||||
{
|
||||
IP: '0.0.0.0',
|
||||
PrivatePort: 9443,
|
||||
PublicPort: 9443,
|
||||
PrivatePort: 9000,
|
||||
PublicPort: 9000,
|
||||
Type: 'tcp',
|
||||
},
|
||||
],
|
||||
@@ -46,11 +46,11 @@ describe('startContainerController', function () {
|
||||
var expectedBody = {
|
||||
name: 'container-name',
|
||||
ExposedPorts: {
|
||||
'9443/tcp': {},
|
||||
'9000/tcp': {},
|
||||
},
|
||||
HostConfig: {
|
||||
PortBindings: {
|
||||
'9443/tcp': [
|
||||
'9000/tcp': [
|
||||
{
|
||||
HostPort: '9999',
|
||||
HostIp: '10.20.10.15',
|
||||
@@ -76,7 +76,7 @@ describe('startContainerController', function () {
|
||||
{
|
||||
ip: '10.20.10.15',
|
||||
extPort: '9999',
|
||||
intPort: '9443',
|
||||
intPort: '9000',
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user