Compare commits

...

388 Commits

Author SHA1 Message Date
Dokku Bot
2e66cee50f Release 0.33.2
# History

## 0.33.2

Install/update via the bootstrap script:

```shell
wget -NP . https://dokku.com/install/v0.33.2/bootstrap.sh
sudo DOKKU_TAG=v0.33.2 bash bootstrap.sh
```

### Bug Fixes

- #6535: @josegonzalez Properly fetch default vector image if none is passed
- #6533: @josegonzalez Ensure all k3s traefik middleware resources are scoped to the process
- #6524: @josegonzalez Ensure all copied files always have line endings converted to unix-style

### New Features

- #6537: @josegonzalez Add the dokku logo as the chart icon
- #6527: @josegonzalez Upgrade vector image to 0.35.x
- #6534: @josegonzalez Allow specifying an ingress class via chart value

### Documentation

- #6530: @josegonzalez Fix indentation on letsencrypt sections for k3s scheduler docs

### Tests

- #6532: @josegonzalez Correct issues in tests for vector image log property

### Dependencies

- #6540: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.5 to 9.5.6 in /docs/_build
- #6538: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 42.0.1 to 42.0.2
- #6528: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 42.0.0 to 42.0.1
- #6529: @dependabot[bot] chore(deps): bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /tests/apps/gogrpc

### Other

- #6526: @josegonzalez Allow setting the vector image as a global property
2024-01-29 14:20:48 +00:00
Jose Diaz-Gonzalez
61f1a23238 Merge pull request #6540 from dokku/dependabot/pip/docs/_build/mkdocs-material-9.5.6
chore(deps): bump mkdocs-material from 9.5.5 to 9.5.6 in /docs/_build
2024-01-29 09:18:55 -05:00
dependabot[bot]
d8dc566b35 chore(deps): bump mkdocs-material from 9.5.5 to 9.5.6 in /docs/_build
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.5 to 9.5.6.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.5...9.5.6)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 13:26:35 +00:00
Jose Diaz-Gonzalez
8ee12eaf5c Merge pull request #6538 from dokku/dependabot/github_actions/tj-actions/changed-files-42.0.2
chore(deps): bump tj-actions/changed-files from 42.0.1 to 42.0.2
2024-01-29 07:16:44 -05:00
dependabot[bot]
fb1420f78f chore(deps): bump tj-actions/changed-files from 42.0.1 to 42.0.2
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 42.0.1 to 42.0.2.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v42.0.1...v42.0.2)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 13:45:24 +00:00
Jose Diaz-Gonzalez
ee2e5c426d Merge pull request #6537 from dokku/chart-icon
Add the dokku logo as the chart icon
2024-01-26 06:56:27 -05:00
Jose Diaz-Gonzalez
029e1f5f48 feat: add the dokku logo as the chart icon 2024-01-26 06:55:46 -05:00
Jose Diaz-Gonzalez
3dc917253b Merge pull request #6527 from dokku/upgrade-vector
Upgrade vector image to 0.35.x
2024-01-26 05:21:48 -05:00
Jose Diaz-Gonzalez
ed152ccd83 feat: upgrade vector image to 0.35.x
This is backwards compatible for Dokku's usage, so should be fine to ship.
2024-01-26 04:24:04 -05:00
Jose Diaz-Gonzalez
584be40776 Merge pull request #6535 from dokku/fix-vector-start
Properly fetch default vector image if none is passed
2024-01-26 04:23:18 -05:00
Jose Diaz-Gonzalez
a4a90e3c76 fix: properly fetch default vector image if none is passed 2024-01-26 04:14:28 -05:00
Jose Diaz-Gonzalez
21a59d7f96 Merge pull request #6534 from dokku/ingress-class-setting
Allow specifying an ingress class via chart value
2024-01-26 03:29:18 -05:00
Jose Diaz-Gonzalez
f5182aa553 feat: allow specifying an ingress class via chart value
While Dokku currently only supports traefik, providing this setting will allow swapping out the ingress to another fairly easily.
2024-01-26 03:23:34 -05:00
Jose Diaz-Gonzalez
928d35ee77 Merge pull request #6533 from dokku/process-specific-traefik-middleware
Ensure all k3s traefik middleware resources are scoped to the process
2024-01-26 01:41:09 -05:00
Jose Diaz-Gonzalez
d031f569fc Merge pull request #6532 from dokku/fix-tests
Correct issues in tests for vector image log property
2024-01-26 01:39:23 -05:00
Jose Diaz-Gonzalez
5b8e8b91e3 fix: ensure all k3s traefik middleware resources are scoped to the process
While we currently only create the middleware for the web process, scoping it by process will allow us to expand this in the future.
2024-01-26 01:38:29 -05:00
Jose Diaz-Gonzalez
e2c6cf2527 Merge pull request #6528 from dokku/dependabot/github_actions/tj-actions/changed-files-42.0.1
chore(deps): bump tj-actions/changed-files from 42.0.0 to 42.0.1
2024-01-26 01:11:31 -05:00
Jose Diaz-Gonzalez
d90135fce6 Merge pull request #6529 from dokku/dependabot/go_modules/tests/apps/gogrpc/google.golang.org/protobuf-1.32.0
chore(deps): bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /tests/apps/gogrpc
2024-01-26 01:11:24 -05:00
Jose Diaz-Gonzalez
baad9ec79d fix: correct issues in tests for vector image log property 2024-01-26 01:10:41 -05:00
Jose Diaz-Gonzalez
27703e23cf Merge pull request #6530 from dokku/josegonzalez-patch-1
Fix indentation on letsencrypt sections for k3s scheduler docs
2024-01-25 12:46:55 -05:00
Jose Diaz-Gonzalez
af1b2ba450 docs: fix indentation on letsencrypt sections for k3s scheduler docs 2024-01-25 12:46:31 -05:00
dependabot[bot]
58182f6d38 chore(deps): bump google.golang.org/protobuf in /tests/apps/gogrpc
Bumps google.golang.org/protobuf from 1.31.0 to 1.32.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-25 13:54:52 +00:00
dependabot[bot]
02329b53f6 chore(deps): bump tj-actions/changed-files from 42.0.0 to 42.0.1
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 42.0.0 to 42.0.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v42.0.0...v42.0.1)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-25 13:37:23 +00:00
Jose Diaz-Gonzalez
6843b2ae06 Merge pull request #6526 from dokku/6440-vector-image
Allow setting the vector image as a global property
2024-01-25 04:27:49 -05:00
Jose Diaz-Gonzalez
aa05a95243 feat: allow setting the vector image as a global property 2024-01-25 04:26:57 -05:00
Jose Diaz-Gonzalez
c496f8abd6 Merge pull request #6524 from dokku/6490-dos2unix-copy
Ensure all copied files always have line endings converted to unix-style
2024-01-25 00:37:01 -05:00
Jose Diaz-Gonzalez
b6425ab431 fix: ensure all copied files always have line endings converted to unix-style
Closes #6490
2024-01-24 23:54:10 -05:00
Dokku Bot
9ac76dec2f Release 0.33.1
# History

## 0.33.1

Install/update via the bootstrap script:

```shell
wget -NP . https://dokku.com/install/v0.33.1/bootstrap.sh
sudo DOKKU_TAG=v0.33.1 bash bootstrap.sh
```

### Bug Fixes

- #6520: @josegonzalez Guard against missing healthcheck config
- #6519: @josegonzalez Use correct name for cluster-issuers helm chart

### Refactors

- #6521: @josegonzalez Install traefik via helm chart directly to avoid issues where traefik silently fails installation

### Dependencies

- #6523: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.4 to 9.5.5 in /docs/_build
- #6522: @dependabot[bot] chore(deps): bump google.golang.org/grpc from 1.60.1 to 1.61.0 in /tests/apps/gogrpc
2024-01-25 03:15:18 +00:00
Jose Diaz-Gonzalez
ea95d71e56 Merge pull request #6523 from dokku/dependabot/pip/docs/_build/mkdocs-material-9.5.5
chore(deps): bump mkdocs-material from 9.5.4 to 9.5.5 in /docs/_build
2024-01-24 21:40:21 -05:00
Jose Diaz-Gonzalez
b1334c7406 Merge pull request #6522 from dokku/dependabot/go_modules/tests/apps/gogrpc/google.golang.org/grpc-1.61.0
chore(deps): bump google.golang.org/grpc from 1.60.1 to 1.61.0 in /tests/apps/gogrpc
2024-01-24 21:40:02 -05:00
dependabot[bot]
44e3d38d45 chore(deps): bump mkdocs-material from 9.5.4 to 9.5.5 in /docs/_build
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.4 to 9.5.5.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.4...9.5.5)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-24 13:58:25 +00:00
dependabot[bot]
ef20b22f54 chore(deps): bump google.golang.org/grpc in /tests/apps/gogrpc
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.60.1 to 1.61.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.60.1...v1.61.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-24 13:42:02 +00:00
Jose Diaz-Gonzalez
2be6a1724b Merge pull request #6521 from dokku/standalone-traefik-install
Install traefik via helm chart directly to avoid issues where traefik silently fails installation
2024-01-24 05:02:28 -05:00
Jose Diaz-Gonzalez
ea55db2747 refactor: install traefik via helm chart directly to avoid issues where traefik silently fails installation 2024-01-24 03:58:39 -05:00
Jose Diaz-Gonzalez
e164f8393a Merge pull request #6520 from dokku/healthcheck-fixes
Guard against missing healthcheck config
2024-01-24 02:40:18 -05:00
Jose Diaz-Gonzalez
1d99e0bc6e fix: guard against missing healthcheck config
Also add support for liveness and readiness probes.
2024-01-24 02:39:39 -05:00
Jose Diaz-Gonzalez
a64e9514ee Merge pull request #6519 from dokku/fix-cluster-issuers-name
Use correct name for cluster-issuers helm chart
2024-01-24 02:33:01 -05:00
Jose Diaz-Gonzalez
578afc0ef7 fix: use correct name for cluster-issuers 2024-01-24 02:19:21 -05:00
Dokku Bot
6fec401ded Release 0.33.0
# History

## 0.33.0

Install/update via the bootstrap script:

```shell
wget -NP . https://dokku.com/install/v0.33.0/bootstrap.sh
sudo DOKKU_TAG=v0.33.0 bash bootstrap.sh
```

### Bug Fixes

- #6466: @josegonzalez Use correct key for migrating global scheduler configuration on upgrade
- #6450: @josegonzalez Always set -- on docker run commands internally to avoid parsing flags on specified commands
- #6447: @josegonzalez Propagate arm64 build support for development builds
- #6445: @josegonzalez Do not strip whitespace when displaying a file for debugging purposes
- #6442: @josegonzalez Ignore go.work when bumping modules
- #6427: @josegonzalez Add missing gitignore entry for app-json trigger

### New Features

- #6500: @josegonzalez Add support for custom user namespaces when creating persistent storage directories
- #6492: @josegonzalez Add support for multierror when exiting triggers
- #6491: @josegonzalez Add wrappers for exec and ssh commands
- #6489: @josegonzalez Disable flag parsing for dokku enter
- #6469: @josegonzalez Allow generating an ssh deploy key via the git plugin
- #6468: @josegonzalez Implement global support for setting proxy type
- #6467: @josegonzalez Add ability to customize the registry repo with a template
- #6464: @josegonzalez Create helper function for exposing a docker image's working directory
- #6462: @josegonzalez Ensure ps:stop has a proper cli header
- #6460: @josegonzalez Add a post-registry-login trigger
- #6459: @josegonzalez Alias common registry names to docker.io
- #6457: @josegonzalez Add the ability to specify the output format when listing ports
- #6452: @josegonzalez Add alternative implementation for calling plugin triggers
- #6446: @josegonzalez Add support for global-only environment properties
- #6443: @josegonzalez Add support for exposing healthchecks in the AppJson struct
- #6435: @josegonzalez Implement native k3s scheduler support
- #6433: @josegonzalez Add go.work.sum to gitignore
- #6432: @josegonzalez Upgrade golang to 1.21.6
- #6430: @josegonzalez Reformat devcontainer file
- #6428: @josegonzalez Add ms-azuretools.vscode-docker to devcontainer setup
- #6313: @josegonzalez Set the platform flag in order to run amd64 images on arm64 deploy targets

### Refactors

- #6448: @josegonzalez Return an int32 for scale count
- #6444: @josegonzalez Allow setting a custom mode when writing a slice to a file

### Documentation

- #6517: @josegonzalez Remove k3s tutorial from documentation
- #6516: @josegonzalez Note that the external kubernetes plugin is deprecated
- #6515: @josegonzalez Replace the kubernetes plugin with k3s in the documentation
- #6514: @josegonzalez Add notes on k3s replacement of the scheduler-kubernetes plugin
- #6461: @josegonzalez Add documentation for implementing scheduler-related commands
- #6458: @josegonzalez Add docblocks to appjson structs
- #6420: @aochagavia Fix typo in zero downtime documentation

### Tests

- #6465: @josegonzalez Update haproxy tests so they pass
- #6449: @josegonzalez Run ci on ubuntu 22.04
- #6431: @josegonzalez Add golanglint-ci testing support

### Dependencies

- #6513: @dependabot[bot] chore(deps): bump github.com/containerd/containerd from 1.7.6 to 1.7.11 in /plugins/scheduler-k3s
- #6512: @josegonzalez Update github.com/gonsi/gomega golang dependency
- #6511: @josegonzalez Update crypto and sys golang dependencies
- #6494: @dependabot[bot] chore(deps): bump markupsafe from 2.1.3 to 2.1.4 in /docs/_build
- #6482: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.3 to 9.5.4 in /docs/_build
- #6478: @dependabot[bot] chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/zombies-dockerfile-tini
- #6456: @dependabot[bot] chore(deps): bump google.golang.org/grpc from 1.29.1 to 1.60.1 in /tests/apps/gogrpc
- #6454: @dependabot[bot] chore(deps): bump flask from 3.0.0 to 3.0.1 in /tests/apps/python-flask
- #6455: @dependabot[bot] chore(deps): bump flask from 3.0.0 to 3.0.1 in /tests/apps/multi
- #6453: @josegonzalez Remove ignored dependency from dependabot
- #6451: @josegonzalez Update go modules
- #6439: @dependabot[bot] chore(deps): bump github.com/onsi/gomega from 1.30.0 to 1.31.0 in /plugins/config
- #6438: @dependabot[bot] chore(deps): bump github.com/onsi/gomega from 1.30.0 to 1.31.0 in /plugins/common
- #6437: @dependabot[bot] chore(deps): bump beautifulsoup4 from 4.12.2 to 4.12.3 in /docs/_build
- #6436: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 41.1.1 to 42.0.0
- #6425: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 41.0.1 to 41.1.1
- #6424: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.3 to 9.5.4 in /docs/_build
- #6421: @josegonzalez chore: bump golang.org/x/sync from 0.5.0 to 0.6.0
- #6419: @dependabot[bot] chore(deps): bump jinja2 from 3.1.2 to 3.1.3 in /docs/_build
- #6418: @dependabot[bot] chore(deps): bump jinja2 from 3.1.2 to 3.1.3 in /tests/apps/python-flask
- #6415: @dependabot[bot] chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/go-fail-postdeploy
- #6414: @dependabot[bot] chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/gogrpc
- #6413: @dependabot[bot] chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/go-fail-predeploy
- #6412: @dependabot[bot] chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/zombies-dockerfile-no-tini
- #6411: @dependabot[bot] chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/zombies-dockerfile-tini
- #6410: @dependabot[bot] chore(deps): bump golang.org/x/net from 0.19.0 to 0.20.0 in /tests/apps/gogrpc
- #6406: @dependabot[bot] chore(deps): bump golang.org/x/sync from 0.5.0 to 0.6.0 in /plugins/scheduler-docker-local

### Other

- #6463: @josegonzalez Use exported function from appjson module instead of manually parsing
- #6429: @josegonzalez Use go.work for development purposes
2024-01-23 17:55:18 +00:00
Jose Diaz-Gonzalez
a644908fbf fix: add missing help output 2024-01-23 12:52:08 -05:00
Jose Diaz-Gonzalez
b56495b367 docs: clarify that a rebuild is required 2024-01-23 11:47:50 -05:00
Jose Diaz-Gonzalez
4f26913e44 Merge pull request #6517 from dokku/josegonzalez-patch-1
Remove k3s tutorial from documentation
2024-01-23 11:38:47 -05:00
Jose Diaz-Gonzalez
bbf9febe30 docs: remove k3s tutorial from documentation
This belongs in the tutorial section
2024-01-23 11:38:33 -05:00
Jose Diaz-Gonzalez
54a12c9c89 Merge pull request #6516 from dokku/josegonzalez-patch-1
Note that the external kubernetes plugin is deprecated
2024-01-23 11:12:09 -05:00
Jose Diaz-Gonzalez
2cd8e1e61e Note that the external kubernetes plugin is deprecated
This was never in the core and thus doesn't need to be called out.
2024-01-23 11:11:35 -05:00
Jose Diaz-Gonzalez
ca33c437d3 Merge pull request #6515 from dokku/josegonzalez-patch-1
Replace the kubernetes plugin with k3s in the documentation
2024-01-23 11:09:15 -05:00
Jose Diaz-Gonzalez
ef63b28804 chore: replace the kubernetes plugin with k3s 2024-01-23 11:08:56 -05:00
Jose Diaz-Gonzalez
5958179d86 Merge pull request #6514 from dokku/josegonzalez-patch-1
docs: add notes on k3s replacement of the scheduler-kubernetes plugin
2024-01-23 11:08:37 -05:00
Jose Diaz-Gonzalez
67ef6f98ab docs: add notes on k3s replacement of the scheduler-kubernetes plugin 2024-01-23 11:07:46 -05:00
Jose Diaz-Gonzalez
7025968b74 Merge pull request #6513 from dokku/dependabot/go_modules/plugins/scheduler-k3s/github.com/containerd/containerd-1.7.11
chore(deps): bump github.com/containerd/containerd from 1.7.6 to 1.7.11 in /plugins/scheduler-k3s
2024-01-23 10:46:49 -05:00
dependabot[bot]
3d4005b3e6 chore(deps): bump github.com/containerd/containerd
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.7.6 to 1.7.11.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.7.6...v1.7.11)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 15:45:05 +00:00
Jose Diaz-Gonzalez
5d8fdb31db Merge pull request #6512 from dokku/update-go-gomega
Update github.com/gonsi/gomega golang dependencies
2024-01-23 10:43:49 -05:00
Jose Diaz-Gonzalez
552d08ea88 chore: update gonsi/gomega golang dependencies 2024-01-23 10:43:18 -05:00
Jose Diaz-Gonzalez
790f087800 Merge pull request #6478 from dokku/dependabot/docker/tests/apps/zombies-dockerfile-tini/golang-1.21.6
chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/zombies-dockerfile-tini
2024-01-23 10:41:03 -05:00
Jose Diaz-Gonzalez
dda8aed1e2 Merge pull request #6482 from dokku/dependabot/pip/docs/_build/mkdocs-material-9.5.4
chore(deps): bump mkdocs-material from 9.5.3 to 9.5.4 in /docs/_build
2024-01-23 10:40:38 -05:00
Jose Diaz-Gonzalez
0f3538f158 Merge pull request #6494 from dokku/dependabot/pip/docs/_build/markupsafe-2.1.4
chore(deps): bump markupsafe from 2.1.3 to 2.1.4 in /docs/_build
2024-01-23 10:40:31 -05:00
Jose Diaz-Gonzalez
82835e03a2 Merge pull request #6511 from dokku/update-go-crypto
Update crypto and sys golang dependencies
2024-01-23 10:40:09 -05:00
Jose Diaz-Gonzalez
569105d479 chore: update crypto and sys golang dependencies 2024-01-23 10:39:39 -05:00
Jose Diaz-Gonzalez
68d61fba0b fix: set correct version on plugin 2024-01-23 10:38:01 -05:00
dependabot[bot]
51e2676c3b chore(deps): bump markupsafe from 2.1.3 to 2.1.4 in /docs/_build
Bumps [markupsafe](https://github.com/pallets/markupsafe) from 2.1.3 to 2.1.4.
- [Release notes](https://github.com/pallets/markupsafe/releases)
- [Changelog](https://github.com/pallets/markupsafe/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/markupsafe/compare/2.1.3...2.1.4)

---
updated-dependencies:
- dependency-name: markupsafe
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-23 15:37:27 +00:00
Jose Diaz-Gonzalez
dc1d9fe92f Merge pull request #6470 from dokku/0.33-release
Release 0.33.0
2024-01-23 10:33:59 -05:00
Jose Diaz-Gonzalez
c53e7330b5 Merge pull request #6435 from dokku/k3s-support
Implement native k3s scheduler support
2024-01-23 10:31:07 -05:00
Jose Diaz-Gonzalez
ee23dac2f3 fix: respect the namespace 2024-01-23 10:16:40 -05:00
Jose Diaz-Gonzalez
6707e5f1eb feat: add redirect to https when both an http and https port mapping match 2024-01-23 09:45:20 -05:00
Jose Diaz-Gonzalez
56ee889295 chore: note that the cluster-issuer is managed by dokku 2024-01-23 09:32:52 -05:00
Jose Diaz-Gonzalez
c1b3c73096 chore: drop unnecessary key 2024-01-23 09:32:41 -05:00
Jose Diaz-Gonzalez
1f35575a2a fix: use the container port as the target to fix an issue where kubernetes will remove duplicate containerPort entries with different names 2024-01-23 08:59:44 -05:00
Jose Diaz-Gonzalez
d8fcabdf40 fix: always route to http instead of https
Otherwise, we're assuming the app pod is going to handle https requests and not the ingress
2024-01-23 08:10:16 -05:00
Jose Diaz-Gonzalez
7b2484962b fix: set tls field on ingress-route 2024-01-23 07:59:14 -05:00
Jose Diaz-Gonzalez
1d07801f3c fix: set ttl property at correct level for cronjobs 2024-01-23 07:25:51 -05:00
Jose Diaz-Gonzalez
cf7d35601d fix: delete the temporary helm chart on disk 2024-01-23 07:25:42 -05:00
Jose Diaz-Gonzalez
99f20a962e refactor: rename helm chart to app name 2024-01-23 07:25:28 -05:00
Jose Diaz-Gonzalez
25925c0ae2 chore: remove logging from inside helm client 2024-01-23 07:25:18 -05:00
Jose Diaz-Gonzalez
4a7db5ce24 feat: apply the cluster issuers on every app deploy
This ensures we can always get certificates regardless of what app gets deployed with whatever configuration.
2024-01-23 07:25:03 -05:00
Jose Diaz-Gonzalez
c8f5ad9029 fix: correct issues in certificate generation 2024-01-23 06:18:25 -05:00
Jose Diaz-Gonzalez
a9e6e96697 feat: implement scheduler-k3s:report 2024-01-23 05:01:23 -05:00
Jose Diaz-Gonzalez
cc62bc080b fix: use correct field for comparison 2024-01-23 04:55:38 -05:00
Jose Diaz-Gonzalez
fbbc967e8d chore: add todo 2024-01-23 04:55:24 -05:00
Jose Diaz-Gonzalez
a0811c2cb3 fix: move field to correct location 2024-01-23 04:42:20 -05:00
Jose Diaz-Gonzalez
57e76e29d1 fix: correct the scope on the token 2024-01-23 04:25:41 -05:00
Jose Diaz-Gonzalez
ff849cd4f8 fix: touch the known hosts file earlier 2024-01-23 04:25:25 -05:00
Jose Diaz-Gonzalez
204517074b fix: allow setting a custom ip address as the ip pf the dokku server
This will provide the ability to override cases where the detected ip address is invalid for whatever reason.
2024-01-23 03:26:32 -05:00
Jose Diaz-Gonzalez
c6838b645e chore: update go mod 2024-01-23 03:21:21 -05:00
Jose Diaz-Gonzalez
56f25c4855 fix: ensure the known_hosts file exists before attempting to ssh onto a server 2024-01-23 03:21:05 -05:00
Jose Diaz-Gonzalez
1e559f20e5 refactor: use helper function to get process resources 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
2336063ca2 refactor: move templating into pseudo-generated helm chart
The previous mechanism of constructing the helm chart was pretty obnoxious due to needing to have some things in the object and some in template files that were appended afterwards. This change simplifies that by using template files per type with minimal replacements.
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
75539273e3 docs: update documentation 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
2eb346d50d fix: allow setting letsencrypt-server globally 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
001ae3c83b fix: set default value for rollback-on-failure 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
b1802547ae feat: add letsencrypt support 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
62c8cb770e feat: add support for global properties 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
22f27ea2d3 fix: add missing newline 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
661dfbbf51 chore: ignore yaml files in scheduler-k3s plugin 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
29760e8ecd feat: add support to tls for ingress-route
If tls is enabled on the process, we create add the https entrypoint and also add the requisite tls secret-name
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
63a6e9087f feat: create tls certificate if tls is enabled and the app has domains 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
b0485495e4 refactor: make domains a helm value
This will allow updating domains on the fly
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
01ec08fd79 refactor: simplify port string 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
2bee070e78 chore: unify context handling 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
2619c3db08 fix: ensure critical addons come up when the node is tainted
Rather than taint on `node-role.kubernetes.io/master=true:NoSchedule`, we check for `CriticalAddonsOnly=true:NoSchedule` and taint on that.
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
b64c3a1859 chore: add missing import 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
3d6225406d chore: rename input variable 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
3ddfd2bc7d feat: install cert-manager 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
f7acbb1e7c refactor: place all required manifests in a single location
This will make it easier for us to apply the installs.
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
e4a74366ba chore: move around structs to be closer to the functions using them 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
309256955d feat: label the k3s server nodes as capable of fronting traffic
The idea here is that only k3s nodes can/should handle certificate requests. While users may wish to force these onto dedicated lb nodes in the future, at least for now, separating app workloads with routing seems like an okay trade-off.
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
0730647af7 feat: implement :cluster-list and :cluster-remove
These - and the existing :cluster-add command - do not require root.
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
d494e01c7b chore: update error message 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
33a3e6a2fc chore: drop unused node label 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
3375474a4c feat: copy the registry file to all remote hosts 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
a354210f67 fix: treat the registry file as a pointer 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
09ca1f1299 fix: correct issue with file copygin 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
707c22eae7 chore: update docs concerning network requests 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
78bc2849cb feat: add longhorn 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
68fef56403 docs: remove note about syncing with traefik 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
34b06d488f fix: add missing makefile and dokku entries for uninstall and cluster-add 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
b85bc49f03 docs: update k3s documentation 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
a1428ceb74 fix: do not set a static token and generate one as needed 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
69e9511666 feat: implement cluster joining for server and worker nodes
Different options get applied to each depending on what is needed for the role.

This also updates how we initialize the cluster to better support how metrics exposure and cross-server networking.
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
af3009f0da chore: bump go modules 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
632b26905a feat: use common labels instead of custom ones 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
9cd0644883 refactor: fix issues with pod entering
- ensure we always wait for the specific pod we want to be ready
- enter the default container if none is specified
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
5c4e1dfc39 fix: do not attempt to uninstall a chart that isn't available 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
86da40ba19 feat: add default-container annotation everywhere 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
cee47b4836 fix: do not try and override image repo 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
e6d372f963 docs: reference image repo templating and git key generation for setup 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
dce900588e chore: revert -- change 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
ceae555e43 docs: revert docs 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
84ef557c93 docs: remove now incorrect docs 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
4650585ded fix: pull pass from env var 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
27b82f77a3 fix: drop duplicate 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
5449c35dbe fix: correct path to registry config and update go.mod 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
e13561ec4d refactor: move registry path to const 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
a90f6bdee8 docs: remove need to add --
This is done transparently now by Dokku, so no need to have a bc-break
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
599692446e docs: update what is supported 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
8762bede07 feat: implement healthcheck support 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
da4771e6e4 fix: uninstall in foreground 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
997f04afae chore: document that flag parsing should be stopped via -- 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
ba714c189f fix: do not parse flags 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
7bce908c2d fix: properly set the command for herokuish apps 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
cb62ab02f4 fix: add missing post-deploy triggers 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
c2b78bb2d7 feat: implement run:list 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
e4855941fe feat: allow for stable cron names
The cron id is too long to store in the cronjob, so we generate a short identifier and look that up each time on deploy to ensure stability across time.
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
297853781f refactor: move all k8s code behind client
Also fix an issue where attaching to pods fails in rare cases
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
1c5505f78b refactor: move functions around and ensure we respect local versions of golang dependencies 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
9d27ff39da refactor: only delete the helm chart in the scheduler-post-delete hook 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
10e3bac24c docs: remove references to docker-local 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
966ce76122 docs: add a note saying multi-cluster work isn't yet implemented 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
bb8fd39e80 chore: drop extra debugging for one-off jobs 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
277df036e9 feat: implement default resource limits for cron tasks 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
0127f836fa feat: implement cron jobs 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
3f7e1d161a chore: remove unused docker args code 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
8b8444fb1f feat: implement run and run:detached
This utilizes a Kubernetes Job to start a pod in order to take advantage of completed Job cleanup in Kubernetes. It also properly handles interactivity by ensuring the container has a TTY.

Note that there is currently no provision for parsing docker arguments and translating them into their Kubernetes equivalents.
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
6b85374857 feat: implement scheduler-k3s:show-config 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
a2504fadd2 chore: add a note about stopping nginx 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
1e11ec3911 fix: setup all port maps correctly on service 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
2911218816 feat: add an annotations everywhere to ensure folks know what is managed by dokku 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
dfa7d0f78c feat: mark created namespaces as managed by dokku 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
46b6f446fd feat: implement ps:stop for k3s scheduler
This simply scales down processes.
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
8a719a2880 docs: update docs to point out unsupported functionality 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
3137c457fa fix: kill log tailing properly on ctrl+c 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
57b62f51d3 refactor: update log streaming so plugin triggers don't get abandoned on ctrl-c
We now propagate a cancellable context object on a new plugin trigger call that allows for signals to work as expected.
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
9c891563c3 feat: implement logs command for kubernetes 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
c2d1f80bc4 feat: implement app deletion 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
55d7a4a1a0 docs: document that enter is implemented 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
737f54a5c7 feat: implement dokku enter for k8s scheduler 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
6fb03eda4e feat: implement most of deployments
The big feature missing from deployments today is healthchecks, which require extra parsing of the app.json format since the healthchecks there aren't immediately serializable to kubernetes deployment healthchecks.

Other smaller missing functionality from the existing OSS kubernetes scheduler are:

- The ability to set custom pod annotations
- The ability to set custom deployment annotations
- The ability to mount volumes

Exposing these pieces of functionality will come at a later date, if at all.
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
6c234c66a3 fix: guard the initialize call if k3s is already installed 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
7101d1bf7b fix: close the file before attempting to write it
Also remove the unnecessary sleep call
2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
f377c23403 feat: setup k3s registry automatically on registry login 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
65d840e4bc chore: stub out post-registry-login 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
ec538ce1c5 feat: implement scheduler-k3s:initialize 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
d6824c44c7 fix: correct plugin name 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
523d7bcf9e chore: bump golang.org/x/sync from 0.5.0 to 0.6.0 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
3821d22b93 chore: write go.sum file 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
a80c73fb2c feat: create skeleton of k3s plugin 2024-01-23 03:00:27 -05:00
Jose Diaz-Gonzalez
3bf677ff9b Merge pull request #6500 from dokku/3454-chown-add
Add support for custom user namespaces when creating persistent storage directories
2024-01-23 02:50:39 -05:00
Jose Diaz-Gonzalez
7381cf74c6 feat: add support for custom user namespaces when creating persistent storage directories
Closes #3454
2024-01-23 02:25:11 -05:00
Jose Diaz-Gonzalez
cb558c1a19 Merge pull request #6492 from dokku/multierror-logging
Add support for multierror when exiting triggers
2024-01-20 06:58:21 -05:00
Jose Diaz-Gonzalez
6908177095 feat: add support for multierror when exiting triggers 2024-01-20 06:57:48 -05:00
Jose Diaz-Gonzalez
d40b264a40 Merge pull request #6491 from dokku/exec-ssh-tasks
Add wrappers for exec and ssh commands
2024-01-20 05:27:30 -05:00
Jose Diaz-Gonzalez
b6d3749f51 feat: add sftp implementation 2024-01-20 05:26:37 -05:00
Jose Diaz-Gonzalez
0cf26ac994 feat: add wrappers for exec and ssh commands 2024-01-20 05:05:35 -05:00
Jose Diaz-Gonzalez
e2056e296b Merge pull request #6489 from dokku/disable-flag-parsing-for-enter
Disable flag parsing for dokku enter
2024-01-19 20:26:20 -05:00
Jose Diaz-Gonzalez
83b0cf4065 fix: always set -- on docker exec commands internally to avoid parsing flags on specified commands 2024-01-19 20:02:20 -05:00
Jose Diaz-Gonzalez
1172ac4653 Merge pull request #6468 from dokku/global-proxy-type
Implement global support for setting proxy type
2024-01-19 08:39:46 -05:00
Jose Diaz-Gonzalez
dc39e5c0f3 Merge pull request #6467 from dokku/registry-repo-template
Add ability to customize the registry repo with a template
2024-01-19 08:39:01 -05:00
Jose Diaz-Gonzalez
2e0f1ac89a Merge pull request #6469 from dokku/git-deploy-key
Allow generating an ssh deploy key via the git plugin
2024-01-19 07:24:13 -05:00
Jose Diaz-Gonzalez
4fc3ab4b7a fix: reverse the expected proxy type 2024-01-19 07:15:36 -05:00
Jose Diaz-Gonzalez
213f9400ec Merge pull request #6456 from dokku/dependabot/go_modules/tests/apps/gogrpc/google.golang.org/grpc-1.60.1
chore(deps): bump google.golang.org/grpc from 1.29.1 to 1.60.1 in /tests/apps/gogrpc
2024-01-19 06:44:32 -05:00
dependabot[bot]
44c8d69096 chore(deps): bump mkdocs-material from 9.5.3 to 9.5.4 in /docs/_build
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.3 to 9.5.4.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.3...9.5.4)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-19 11:42:37 +00:00
dependabot[bot]
d711c729cf chore(deps): bump golang in /tests/apps/zombies-dockerfile-tini
Bumps golang from 1.21.5 to 1.21.6.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-19 11:42:27 +00:00
Jose Diaz-Gonzalez
874f2dfaf4 feat: set the platform flag in order to run amd64 images on arm64 deploy targets
This allows folks to use herokuish, pack, and lambda built-images on arm64 servers.

Closes #6312
2024-01-19 06:37:48 -05:00
Jose Diaz-Gonzalez
7fbb86093b feat: implement global support for setting proxy type 2024-01-19 06:31:19 -05:00
Jose Diaz-Gonzalez
ec65d97139 feat: allow generating an ssh deploy key via the git plugin
While this might not seem super intuitive, the key is mostly related to git management, not the ssh-keys we currently use to add/remove access to push to dokku.
2024-01-19 06:30:30 -05:00
Jose Diaz-Gonzalez
214dc9b69a feat: add ability to customize the registry repo with a template 2024-01-19 06:29:32 -05:00
Jose Diaz-Gonzalez
ea28367689 Merge pull request #6466 from dokku/josegonzalez-patch-1
Use correct key for migrating global scheduler configuration on upgrade
2024-01-19 06:24:46 -05:00
Jose Diaz-Gonzalez
69e79b227d fix: use correct key for migrating global scheduler configuration on upgrade 2024-01-19 06:24:18 -05:00
Jose Diaz-Gonzalez
ab735333c6 fix: update the test 2024-01-19 03:51:21 -05:00
Jose Diaz-Gonzalez
6c6d016f1b chore: update gogrpc codebase from upstream 2024-01-19 03:14:39 -05:00
dependabot[bot]
43775d7b91 chore(deps): bump google.golang.org/grpc in /tests/apps/gogrpc
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.29.1 to 1.60.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.29.1...v1.60.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-19 02:28:30 -05:00
Jose Diaz-Gonzalez
ab51247e3a Merge pull request #6465 from dokku/fix-haproxy-tests
Update haproxy tests so they pass
2024-01-19 02:27:52 -05:00
Jose Diaz-Gonzalez
464019f439 tests: sleep for a bit before testing haproxy 2024-01-19 02:09:55 -05:00
Jose Diaz-Gonzalez
193798b9e6 debug: check on all hosts 2024-01-18 23:49:06 -05:00
Jose Diaz-Gonzalez
f0c7985970 fix: update haproxy tests so they pass 2024-01-18 22:47:07 -05:00
Jose Diaz-Gonzalez
d656d185ce Merge pull request #6464 from dokku/docker-workdir
Create helper function for exposing a docker image's working directory
2024-01-18 22:38:58 -05:00
Jose Diaz-Gonzalez
68fd65b25f feat: create helper function for exposing a docker image's working directory 2024-01-18 22:38:37 -05:00
Jose Diaz-Gonzalez
c72ed428a4 Merge pull request #6463 from dokku/cron-appjson
refactor: use exported function from appjson module instead of manually parsing
2024-01-18 22:35:33 -05:00
Jose Diaz-Gonzalez
94926d141f refactor: use exported function from appjson module instead of manually parsing
Also add some missing docblocks.
2024-01-18 22:35:12 -05:00
Jose Diaz-Gonzalez
7984a8d9a0 Merge pull request #6462 from dokku/ps-header
Ensure ps:stop has a proper cli header
2024-01-18 22:31:54 -05:00
Jose Diaz-Gonzalez
2acc492906 chore: ensure ps:stop has a proper cli header 2024-01-18 22:31:41 -05:00
Jose Diaz-Gonzalez
fb851e3e51 Merge pull request #6461 from dokku/scheduler-docs
Add documentation for implementing scheduler-related commands
2024-01-18 22:30:06 -05:00
Jose Diaz-Gonzalez
49d98eb1f2 docs: add documentation for implementing scheduler-related commands 2024-01-18 22:29:52 -05:00
Jose Diaz-Gonzalez
6dadfde948 Merge pull request #6460 from dokku/post-registry-login
Add a post-registry-login trigger
2024-01-18 22:25:50 -05:00
Jose Diaz-Gonzalez
98d0a95ae6 feat: add a post-registry-login trigger
This allows other plugins to execute commands after a registry has been authenticated against.
2024-01-18 22:25:23 -05:00
Jose Diaz-Gonzalez
d89e2ba2bb fix: ensure we default to stdout format 2024-01-18 22:19:02 -05:00
Jose Diaz-Gonzalez
199e29cc15 Merge pull request #6454 from dokku/dependabot/pip/tests/apps/python-flask/flask-3.0.1
chore(deps): bump flask from 3.0.0 to 3.0.1 in /tests/apps/python-flask
2024-01-18 22:13:15 -05:00
Jose Diaz-Gonzalez
c4984cd4f8 Merge pull request #6455 from dokku/dependabot/pip/tests/apps/multi/flask-3.0.1
chore(deps): bump flask from 3.0.0 to 3.0.1 in /tests/apps/multi
2024-01-18 22:12:56 -05:00
Jose Diaz-Gonzalez
428ad046c6 Merge pull request #6459 from dokku/registry-alias
Alias common registry names to docker.io
2024-01-18 22:11:28 -05:00
Jose Diaz-Gonzalez
4aa13bdf47 feat: alias common registry names to docker.io 2024-01-18 22:10:58 -05:00
Jose Diaz-Gonzalez
4cc44dc5d9 Merge pull request #6458 from dokku/app-json-dockblock
Add docblocks to appjson structs
2024-01-18 22:08:56 -05:00
Jose Diaz-Gonzalez
7a94b10266 feat: add docblocks to appjson structs 2024-01-18 22:08:40 -05:00
Jose Diaz-Gonzalez
215c135487 Merge pull request #6457 from dokku/ports-get-format
Add the ability to specify the output format when listing ports
2024-01-18 22:01:52 -05:00
Jose Diaz-Gonzalez
78d24ead09 feat: add the ability to specify the output format when listing ports 2024-01-18 22:00:53 -05:00
Jose Diaz-Gonzalez
44054ac993 Merge pull request #6452 from dokku/6422-go-execute
Add alternative implementation for calling plugin triggers
2024-01-18 21:58:33 -05:00
dependabot[bot]
66466f6d7c chore(deps): bump flask from 3.0.0 to 3.0.1 in /tests/apps/python-flask
Bumps [flask](https://github.com/pallets/flask) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/3.0.0...3.0.1)

---
updated-dependencies:
- dependency-name: flask
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-19 02:53:15 +00:00
dependabot[bot]
57224f16df chore(deps): bump flask from 3.0.0 to 3.0.1 in /tests/apps/multi
Bumps [flask](https://github.com/pallets/flask) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/3.0.0...3.0.1)

---
updated-dependencies:
- dependency-name: flask
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-19 02:53:15 +00:00
Jose Diaz-Gonzalez
276ae4ea10 Merge pull request #6453 from dokku/josegonzalez-patch-1
Remove ignored dependency from dependabot
2024-01-18 21:52:45 -05:00
Jose Diaz-Gonzalez
f47c767736 chore: remove ignored dependency from dependabot 2024-01-18 21:52:26 -05:00
Jose Diaz-Gonzalez
1a5e17bd68 feat: add alternative implementation for calling plugin triggers
Refs #6422
2024-01-18 21:47:07 -05:00
Jose Diaz-Gonzalez
e093b04511 Merge pull request #6450 from dokku/disable-flag-parsing
Always set -- on docker run commands internally to avoid parsing flags on specified commands
2024-01-18 21:42:34 -05:00
Jose Diaz-Gonzalez
a3ae54a977 Merge pull request #6449 from dokku/ci-on-22
Run ci on ubuntu 22.04
2024-01-18 21:18:08 -05:00
Jose Diaz-Gonzalez
badb73a8de Merge pull request #6451 from dokku/update-go-modules
Update go modules
2024-01-18 21:15:39 -05:00
Jose Diaz-Gonzalez
33f532e022 chore: update go modules 2024-01-18 21:15:04 -05:00
Jose Diaz-Gonzalez
5ffbcf24de fix: always set -- on docker run commands internally to avoid parsing flags on specified commands 2024-01-18 21:00:42 -05:00
Jose Diaz-Gonzalez
59f74cbccf Merge pull request #6444 from dokku/write-to-slice-custom-mode
Allow setting a custom mode when writing a slice to a file
2024-01-18 20:53:58 -05:00
Jose Diaz-Gonzalez
698979983f Merge pull request #6448 from dokku/scale-int32
Return an int32 for scale count
2024-01-18 20:47:02 -05:00
Jose Diaz-Gonzalez
ca23e42e23 Merge pull request #6447 from dokku/propagate-arch
Propagate arm64 build support for development builds
2024-01-18 20:46:44 -05:00
Jose Diaz-Gonzalez
8947060fab Merge pull request #6446 from dokku/global-only-properties
Add support for global-only environment properties
2024-01-18 20:46:24 -05:00
Jose Diaz-Gonzalez
1549f84aa4 Merge pull request #6445 from dokku/cat-file-exact
Do not strip whitespace when displaying a file for debugging purposes
2024-01-18 20:46:06 -05:00
Jose Diaz-Gonzalez
7a54f13da1 tests: run ci on ubuntu 22.04 2024-01-18 20:13:24 -05:00
Jose Diaz-Gonzalez
7cbfb3c750 Merge pull request #6439 from dokku/dependabot/go_modules/plugins/config/github.com/onsi/gomega-1.31.0
chore(deps): bump github.com/onsi/gomega from 1.30.0 to 1.31.0 in /plugins/config
2024-01-18 19:51:35 -05:00
Jose Diaz-Gonzalez
6ae406609c Merge pull request #6438 from dokku/dependabot/go_modules/plugins/common/github.com/onsi/gomega-1.31.0
chore(deps): bump github.com/onsi/gomega from 1.30.0 to 1.31.0 in /plugins/common
2024-01-18 19:51:28 -05:00
Jose Diaz-Gonzalez
37acfca459 Merge pull request #6443 from dokku/healthcheck-exposure
Add support for exposing healthchecks in the AppJson struct
2024-01-18 19:50:49 -05:00
Jose Diaz-Gonzalez
6bcb4a016d refactor: return an int32 for scale count 2024-01-18 19:23:57 -05:00
Jose Diaz-Gonzalez
eb6a0dc71d fix: propagate arm64 build support for development builds 2024-01-18 19:19:53 -05:00
Jose Diaz-Gonzalez
580d2dc3ee feat: add support for global-only environment properties
If a property is only specified globally, it would otherwise be caught later in the check for valid properties.
2024-01-18 19:16:13 -05:00
Jose Diaz-Gonzalez
8cc822eed0 fix: do not strip whitespace when displaying a file for debugging purposes 2024-01-18 19:13:44 -05:00
Jose Diaz-Gonzalez
3f96a250a2 Merge pull request #6436 from dokku/dependabot/github_actions/tj-actions/changed-files-42.0.0
chore(deps): bump tj-actions/changed-files from 41.1.1 to 42.0.0
2024-01-18 19:12:29 -05:00
Jose Diaz-Gonzalez
d971bb31d7 Merge pull request #6437 from dokku/dependabot/pip/docs/_build/beautifulsoup4-4.12.3
chore(deps): bump beautifulsoup4 from 4.12.2 to 4.12.3 in /docs/_build
2024-01-18 19:12:21 -05:00
Jose Diaz-Gonzalez
fb73474675 refactor: allow setting a custom mode when writing a slice to a file 2024-01-18 19:11:53 -05:00
Jose Diaz-Gonzalez
4294694be3 feat: add support for exposing healthchecks in the AppJson struct 2024-01-18 19:05:14 -05:00
Jose Diaz-Gonzalez
d4da8aea84 Merge pull request #6442 from dokku/dev-bump-modules
Ignore go.work when bumping modules
2024-01-18 18:59:39 -05:00
Jose Diaz-Gonzalez
35357abc86 fix: ignore go.work when bumping modules 2024-01-18 18:59:22 -05:00
dependabot[bot]
eb1b8b0f9b chore(deps): bump github.com/onsi/gomega in /plugins/config
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.30.0 to 1.31.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.30.0...v1.31.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-18 14:01:34 +00:00
dependabot[bot]
5007ca1812 chore(deps): bump github.com/onsi/gomega in /plugins/common
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.30.0 to 1.31.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.30.0...v1.31.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-18 13:37:02 +00:00
dependabot[bot]
a97f18c85d chore(deps): bump beautifulsoup4 from 4.12.2 to 4.12.3 in /docs/_build
Bumps [beautifulsoup4](https://www.crummy.com/software/BeautifulSoup/bs4/) from 4.12.2 to 4.12.3.

---
updated-dependencies:
- dependency-name: beautifulsoup4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-18 13:13:57 +00:00
dependabot[bot]
cca5060725 chore(deps): bump tj-actions/changed-files from 41.1.1 to 42.0.0
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 41.1.1 to 42.0.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v41.1.1...v42.0.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-18 13:05:47 +00:00
Jose Diaz-Gonzalez
fe5e5c7d9a Merge pull request #6433 from dokku/josegonzalez-patch-1
Add go.work.sum to gitignore
2024-01-17 02:55:13 -05:00
Jose Diaz-Gonzalez
a69454d683 chore: gitignore go.work.sum
This will change over time and is probably not worth committing.
2024-01-17 02:54:55 -05:00
Jose Diaz-Gonzalez
53fd5fd475 Merge pull request #6432 from dokku/josegonzalez-patch-1
Upgrade golang to 1.21.6
2024-01-17 02:40:34 -05:00
Jose Diaz-Gonzalez
2fdfa65532 fix: correct lint errors 2024-01-17 02:40:18 -05:00
Jose Diaz-Gonzalez
d0acaa827d feat: upgrade golang to 1.21.6 2024-01-17 02:30:19 -05:00
Jose Diaz-Gonzalez
214fd95c98 Merge pull request #6431 from dokku/josegonzalez-patch-1
Add golanglint-ci testing support
2024-01-17 02:28:47 -05:00
Jose Diaz-Gonzalez
bdee495a0a feat: add golangci-lint to the development environment 2024-01-17 02:28:36 -05:00
Jose Diaz-Gonzalez
b8329d76ec tests: add support for running golangci-lint automatically
The plugin paths must be computed at execution because not all plugins contain golang code.
2024-01-17 02:28:11 -05:00
Jose Diaz-Gonzalez
3a47e5f54d feat: add golangci-lint file 2024-01-17 02:26:05 -05:00
Jose Diaz-Gonzalez
555bcbaf1f Merge pull request #6429 from dokku/josegonzalez-patch-1
feat: use go.work for development purposes
2024-01-17 02:20:59 -05:00
Jose Diaz-Gonzalez
3a333551e5 Merge pull request #6430 from dokku/josegonzalez-patch-2
chore: reformat devcontainer file
2024-01-17 02:20:46 -05:00
Jose Diaz-Gonzalez
823a83fed8 chore: reformat devcontainer file 2024-01-17 02:20:26 -05:00
Jose Diaz-Gonzalez
af9dc4604a fix: remove go.work file earlier 2024-01-17 01:58:37 -05:00
Jose Diaz-Gonzalez
9b4a376f68 fix: delete go.work file to resolve codeql issue
CodeQL doesn't currently support go.work files. See https://github.com/github/codeql/issues/14235 for details.
2024-01-17 01:51:11 -05:00
Jose Diaz-Gonzalez
b1a7032e9f fix: correct format of go version in go.work file 2024-01-17 01:40:32 -05:00
Jose Diaz-Gonzalez
85918a9f99 chore: disable go workfiles during builds 2024-01-17 01:27:06 -05:00
Jose Diaz-Gonzalez
066dc29549 fix: drop missing plugin from go.work file 2024-01-17 01:22:25 -05:00
Jose Diaz-Gonzalez
ddfedfa018 chore: drop installing go modules via go get
This is no longer necessary with the introduction of the go.work file.
2024-01-17 01:22:07 -05:00
Jose Diaz-Gonzalez
e4d0b2ca22 feat: use go.work for development purposes
This makes it so we don't have to fake download dependencies for development, allowing for a better experience in your local editor.
2024-01-17 01:21:22 -05:00
Jose Diaz-Gonzalez
2ccb07f509 Merge pull request #6428 from dokku/josegonzalez-patch-1
Add ms-azuretools.vscode-docker to devcontainer setup
2024-01-17 01:14:29 -05:00
Jose Diaz-Gonzalez
422ac72fa4 feat: add ms-azuretools.vscode-docker to devcontainer setup 2024-01-17 01:14:13 -05:00
Jose Diaz-Gonzalez
598ff6a734 Merge pull request #6424 from dokku/dependabot/pip/docs/_build/mkdocs-material-9.5.4
chore(deps): bump mkdocs-material from 9.5.3 to 9.5.4 in /docs/_build
2024-01-17 01:12:33 -05:00
Jose Diaz-Gonzalez
ff70a98852 Merge pull request #6425 from dokku/dependabot/github_actions/tj-actions/changed-files-41.1.1
chore(deps): bump tj-actions/changed-files from 41.0.1 to 41.1.1
2024-01-17 01:12:25 -05:00
Jose Diaz-Gonzalez
9cf0dc01a4 Merge pull request #6427 from dokku/josegonzalez-patch-1
Add missing gitignore entry for app-json trigger
2024-01-17 01:12:09 -05:00
Jose Diaz-Gonzalez
f209adea69 fix: add missing ignore for app-json trigger 2024-01-17 01:11:50 -05:00
dependabot[bot]
8ec29abc9e chore(deps): bump tj-actions/changed-files from 41.0.1 to 41.1.1
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 41.0.1 to 41.1.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v41.0.1...v41.1.1)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 13:43:22 +00:00
dependabot[bot]
cb7203c0ed chore(deps): bump mkdocs-material from 9.5.3 to 9.5.4 in /docs/_build
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.3 to 9.5.4.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.3...9.5.4)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 13:05:42 +00:00
Jose Diaz-Gonzalez
928c388f10 Merge pull request #6421 from dokku/bump-sync
chore: bump golang.org/x/sync from 0.5.0 to 0.6.0
2024-01-11 23:36:30 -05:00
Jose Diaz-Gonzalez
1533e149fc chore: bump golang.org/x/sync from 0.5.0 to 0.6.0 2024-01-11 23:01:50 -05:00
Jose Diaz-Gonzalez
82434256ff Merge pull request #6406 from dokku/dependabot/go_modules/plugins/scheduler-docker-local/golang.org/x/sync-0.6.0
chore(deps): bump golang.org/x/sync from 0.5.0 to 0.6.0 in /plugins/scheduler-docker-local
2024-01-11 23:00:06 -05:00
Jose Diaz-Gonzalez
1da537ac4d Merge pull request #6411 from dokku/dependabot/docker/tests/apps/zombies-dockerfile-tini/golang-1.21.6
chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/zombies-dockerfile-tini
2024-01-11 22:55:41 -05:00
Jose Diaz-Gonzalez
200d67cfc1 Merge pull request #6410 from dokku/dependabot/go_modules/tests/apps/gogrpc/golang.org/x/net-0.20.0
chore(deps): bump golang.org/x/net from 0.19.0 to 0.20.0 in /tests/apps/gogrpc
2024-01-11 22:55:22 -05:00
Jose Diaz-Gonzalez
0cc46e1b54 Merge pull request #6412 from dokku/dependabot/docker/tests/apps/zombies-dockerfile-no-tini/golang-1.21.6
chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/zombies-dockerfile-no-tini
2024-01-11 22:54:51 -05:00
Jose Diaz-Gonzalez
276b23a14b Merge pull request #6413 from dokku/dependabot/docker/tests/apps/go-fail-predeploy/golang-1.21.6
chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/go-fail-predeploy
2024-01-11 22:54:45 -05:00
Jose Diaz-Gonzalez
745c16db94 Merge pull request #6414 from dokku/dependabot/docker/tests/apps/gogrpc/golang-1.21.6
chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/gogrpc
2024-01-11 22:54:38 -05:00
Jose Diaz-Gonzalez
41499c640a Merge pull request #6415 from dokku/dependabot/docker/tests/apps/go-fail-postdeploy/golang-1.21.6
chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/go-fail-postdeploy
2024-01-11 22:54:32 -05:00
Jose Diaz-Gonzalez
5867c029f6 Merge pull request #6418 from dokku/dependabot/pip/tests/apps/python-flask/jinja2-3.1.3
chore(deps): bump jinja2 from 3.1.2 to 3.1.3 in /tests/apps/python-flask
2024-01-11 22:54:25 -05:00
Jose Diaz-Gonzalez
4f3b9b64e3 Merge pull request #6419 from dokku/dependabot/pip/docs/_build/jinja2-3.1.3
chore(deps): bump jinja2 from 3.1.2 to 3.1.3 in /docs/_build
2024-01-11 22:54:19 -05:00
Jose Diaz-Gonzalez
2f5760a680 Merge pull request #6420 from aochagavia/patch-2
Fix typo in zero downtime documentation
2024-01-11 22:53:45 -05:00
Adolfo Ochagavía
99add3359a Fix typo in documentation 2024-01-11 15:09:23 +01:00
dependabot[bot]
9b51b76d98 chore(deps): bump jinja2 from 3.1.2 to 3.1.3 in /docs/_build
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-11 13:50:14 +00:00
dependabot[bot]
59bc4b38cc chore(deps): bump jinja2 from 3.1.2 to 3.1.3 in /tests/apps/python-flask
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.2...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-11 13:40:46 +00:00
dependabot[bot]
745b8e8e5c chore(deps): bump golang in /tests/apps/go-fail-postdeploy
Bumps golang from 1.21.5 to 1.21.6.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-10 13:43:34 +00:00
dependabot[bot]
b13b035cd7 chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/gogrpc
Bumps golang from 1.21.5 to 1.21.6.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-10 13:42:07 +00:00
dependabot[bot]
659e415f43 chore(deps): bump golang in /tests/apps/go-fail-predeploy
Bumps golang from 1.21.5 to 1.21.6.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-10 13:41:09 +00:00
dependabot[bot]
39d4b2d5d0 chore(deps): bump golang in /tests/apps/zombies-dockerfile-no-tini
Bumps golang from 1.21.5 to 1.21.6.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-10 13:31:05 +00:00
dependabot[bot]
f46a03518d chore(deps): bump golang in /tests/apps/zombies-dockerfile-tini
Bumps golang from 1.21.5 to 1.21.6.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-10 13:23:33 +00:00
dependabot[bot]
f2d7d897fd chore(deps): bump golang.org/x/net in /tests/apps/gogrpc
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.19.0 to 0.20.0.
- [Commits](https://github.com/golang/net/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-09 13:41:58 +00:00
Dokku Bot
145b4d7dda Release 0.32.4
# History

## 0.32.4

Install/update via the bootstrap script:

```shell
wget -NP . https://dokku.com/install/v0.32.4/bootstrap.sh
sudo DOKKU_TAG=v0.32.4 bash bootstrap.sh
```

### Bug Fixes

- #6407: @josegonzalez Upgrade ruby to fix the release process
- #6394: @josegonzalez Scope the delete of symlinked plugins in debian post-install to the plugin folders

### Refactors

- #6388: @Juneezee Replace deprecated `io/ioutil` functions

### Documentation

- #6385: @josegonzalez Fix docblock entries for properties in plugins
- #6384: @josegonzalez Cleanup some markdown in documentation
- #6365: @josegonzalez Split out archive/image deployment docs into their own file

### Tests

- #6408: @josegonzalez Add options to the release workflow
- #6359: @josegonzalez Update buildpack api for test buildpack

### Dependencies

- #6399: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.5 to 10.7 in /docs/_build
- #6398: @dependabot[bot] chore(deps): bump sinatra from 3.1.0 to 3.2.0 in /tests/apps/ruby
- #6395: @dependabot[bot] chore(deps): bump ruby from 3.2.2 to 3.3.0 in /tests/apps/dockerfile-entrypoint
- #6391: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.2 to 9.5.3 in /docs/_build
- #6392: @dependabot[bot] chore(deps): bump importlib-metadata from 7.0.0 to 7.0.1 in /docs/_build
- #6393: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 40.2.3 to 41.0.1
- #6387: @dependabot[bot] chore(deps): bump org.eclipse.jetty:jetty-servlet from 11.0.18 to 11.0.19 in /tests/apps/java
- #6386: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 40.2.2 to 40.2.3
- #6377: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 40.2.1 to 40.2.2
- #6380: @dependabot[bot] chore(deps): bump github/codeql-action from 2 to 3
- #6379: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.1 to 9.5.2 in /docs/_build
- #6378: @dependabot[bot] chore(deps): bump python from 3.12.0-alpine to 3.12.1-alpine in /docs/_build
- #6376: @dependabot[bot] chore(deps): bump mkdocs-material from 9.4.14 to 9.5.1 in /docs/_build
- #6371: @dependabot[bot] chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/gogrpc
- #6369: @dependabot[bot] chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/zombies-dockerfile-tini
- #6368: @dependabot[bot] chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/zombies-dockerfile-no-tini
- #6367: @dependabot[bot] chore(deps): bump importlib-metadata from 6.8.0 to 7.0.0 in /docs/_build
- #6366: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 40.2.0 to 40.2.1
- #6370: @dependabot[bot] chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/go-fail-predeploy
- #6372: @dependabot[bot] chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/go-fail-postdeploy
- #6373: @dependabot[bot] chore(deps): bump actions/setup-python from 4 to 5
- #6364: @dependabot[bot] chore(deps): bump golang.org/x/net from 0.18.0 to 0.19.0 in /tests/apps/gogrpc
- #6361: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.4 to 10.5 in /docs/_build
- #6362: @dependabot[bot] chore(deps): bump mkdocs-material from 9.4.12 to 9.4.14 in /docs/_build
- #6360: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 40.1.1 to 40.2.0
- #6357: @dependabot[bot] chore(deps): bump mkdocs-material-extensions from 1.3 to 1.3.1 in /docs/_build
- #6355: @dependabot[bot] chore(deps): bump pygments from 2.16.1 to 2.17.2 in /docs/_build
- #6358: @dependabot[bot] chore(deps): bump mkdocs-material from 9.4.8 to 9.4.12 in /docs/_build
- #6348: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.3.1 to 10.4 in /docs/_build
2024-01-07 09:24:09 +00:00
Jose Diaz-Gonzalez
d8cad25271 Merge pull request #6408 from dokku/release-options
Add options to the release workflow
2024-01-07 02:10:35 -05:00
Jose Diaz-Gonzalez
940f872113 feat: add options to the release workflow
This will make it easier to choose a release type.
2024-01-07 02:10:15 -05:00
Jose Diaz-Gonzalez
115b152ec6 Merge pull request #6407 from dokku/fix-release
Upgrade ruby to fix the release process
2024-01-07 02:04:17 -05:00
Jose Diaz-Gonzalez
9bc9f1f5ce fix: upgrade ruby to fix the release process
Without this, package_cloud doesn't get installed due to an issue with the domain_name pacakge requiring Ruby 2.7.
2024-01-07 02:03:25 -05:00
Jose Diaz-Gonzalez
1547674de3 Merge pull request #6399 from dokku/dependabot/pip/docs/_build/pymdown-extensions-10.7
chore(deps): bump pymdown-extensions from 10.5 to 10.7 in /docs/_build
2024-01-07 00:37:09 -05:00
Jose Diaz-Gonzalez
b0153f7e6b Merge pull request #6398 from dokku/dependabot/bundler/tests/apps/ruby/sinatra-3.2.0
chore(deps): bump sinatra from 3.1.0 to 3.2.0 in /tests/apps/ruby
2024-01-07 00:37:02 -05:00
Jose Diaz-Gonzalez
09363fdc33 Merge pull request #6395 from dokku/dependabot/docker/tests/apps/dockerfile-entrypoint/ruby-3.3.0
chore(deps): bump ruby from 3.2.2 to 3.3.0 in /tests/apps/dockerfile-entrypoint
2024-01-07 00:36:53 -05:00
Jose Diaz-Gonzalez
81e3024999 Merge pull request #6394 from dokku/scoped-postinst-delete
Scope the delete of symlinked plugins in debian post-install to the plugin folders
2024-01-07 00:36:37 -05:00
dependabot[bot]
c3e0f33739 chore(deps): bump golang.org/x/sync in /plugins/scheduler-docker-local
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.5.0 to 0.6.0.
- [Commits](https://github.com/golang/sync/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-05 13:58:06 +00:00
dependabot[bot]
3670120404 chore(deps): bump pymdown-extensions from 10.5 to 10.7 in /docs/_build
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 10.5 to 10.7.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](https://github.com/facelessuser/pymdown-extensions/compare/10.5...10.7)

---
updated-dependencies:
- dependency-name: pymdown-extensions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 13:10:14 +00:00
dependabot[bot]
333212b091 chore(deps): bump sinatra from 3.1.0 to 3.2.0 in /tests/apps/ruby
Bumps [sinatra](https://github.com/sinatra/sinatra) from 3.1.0 to 3.2.0.
- [Changelog](https://github.com/sinatra/sinatra/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sinatra/sinatra/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: sinatra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 13:03:18 +00:00
dependabot[bot]
b6456c07ce chore(deps): bump ruby in /tests/apps/dockerfile-entrypoint
Bumps ruby from 3.2.2 to 3.3.0.

---
updated-dependencies:
- dependency-name: ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-27 13:11:24 +00:00
Jose Diaz-Gonzalez
5b2b4d6ee5 Merge pull request #6388 from Juneezee/refactor/deprecate-ioutil
Replace deprecated `io/ioutil` functions
2023-12-25 14:30:27 -05:00
Jose Diaz-Gonzalez
66c46fc8ff Merge pull request #6391 from dokku/dependabot/pip/docs/_build/mkdocs-material-9.5.3
chore(deps): bump mkdocs-material from 9.5.2 to 9.5.3 in /docs/_build
2023-12-25 14:29:57 -05:00
Jose Diaz-Gonzalez
ae2e0d4d2f Merge pull request #6392 from dokku/dependabot/pip/docs/_build/importlib-metadata-7.0.1
chore(deps): bump importlib-metadata from 7.0.0 to 7.0.1 in /docs/_build
2023-12-25 14:29:51 -05:00
Jose Diaz-Gonzalez
e8a70c14ee Merge pull request #6393 from dokku/dependabot/github_actions/tj-actions/changed-files-41.0.1
chore(deps): bump tj-actions/changed-files from 40.2.3 to 41.0.1
2023-12-25 14:29:44 -05:00
Jose Diaz-Gonzalez
314521cbca fix: scope the delete of symlinked plugins in debian post-install to the plugin folders
Previously, we would try and traverse the entire dokku lib directory, causing extremely slow updates for installations with lots of data. This would also potentially cause issues for anyone using symlinks in their data directories.

Instead, just remove symlinks in the plugin directories.
2023-12-25 14:29:11 -05:00
dependabot[bot]
d6a24f678e chore(deps): bump tj-actions/changed-files from 40.2.3 to 41.0.1
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 40.2.3 to 41.0.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v40.2.3...v41.0.1)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 13:18:02 +00:00
dependabot[bot]
bebae24d2f chore(deps): bump importlib-metadata from 7.0.0 to 7.0.1 in /docs/_build
Bumps [importlib-metadata](https://github.com/python/importlib_metadata) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/python/importlib_metadata/releases)
- [Changelog](https://github.com/python/importlib_metadata/blob/main/NEWS.rst)
- [Commits](https://github.com/python/importlib_metadata/compare/v7.0.0...v7.0.1)

---
updated-dependencies:
- dependency-name: importlib-metadata
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 13:07:28 +00:00
dependabot[bot]
ab3e009823 chore(deps): bump mkdocs-material from 9.5.2 to 9.5.3 in /docs/_build
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.2 to 9.5.3.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.2...9.5.3)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 13:07:23 +00:00
Eng Zer Jun
1d186a5a81 refactor(plugins): replace deprecated io/ioutil functions
The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

[1]: https://golang.org/doc/go1.16#ioutil
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-12-22 01:59:22 +08:00
Jose Diaz-Gonzalez
e6953d60e9 Merge pull request #6387 from dokku/dependabot/maven/tests/apps/java/org.eclipse.jetty-jetty-servlet-11.0.19
chore(deps): bump org.eclipse.jetty:jetty-servlet from 11.0.18 to 11.0.19 in /tests/apps/java
2023-12-21 00:08:40 -05:00
Jose Diaz-Gonzalez
f8f52c1af0 Merge pull request #6386 from dokku/dependabot/github_actions/tj-actions/changed-files-40.2.3
chore(deps): bump tj-actions/changed-files from 40.2.2 to 40.2.3
2023-12-21 00:08:33 -05:00
dependabot[bot]
03d156c994 chore(deps): bump org.eclipse.jetty:jetty-servlet in /tests/apps/java
Bumps [org.eclipse.jetty:jetty-servlet](https://github.com/jetty/jetty.project) from 11.0.18 to 11.0.19.
- [Release notes](https://github.com/jetty/jetty.project/releases)
- [Commits](https://github.com/jetty/jetty.project/compare/jetty-11.0.18...jetty-11.0.19)

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-servlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-20 13:13:42 +00:00
dependabot[bot]
3fc24bf1e3 chore(deps): bump tj-actions/changed-files from 40.2.2 to 40.2.3
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 40.2.2 to 40.2.3.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v40.2.2...v40.2.3)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-19 13:35:14 +00:00
Jose Diaz-Gonzalez
400a87868f Merge pull request #6385 from dokku/docblock-fix
Fix docblock entries for properties in plugins
2023-12-19 00:34:54 -05:00
Jose Diaz-Gonzalez
f6a3db9c6d docs: fix docblock entries for properties in plugins 2023-12-19 00:34:33 -05:00
Jose Diaz-Gonzalez
52bfbcdc3d Merge pull request #6384 from dokku/docs-cleanup
docs: cleanup some markdown in documentation
2023-12-18 23:48:05 -05:00
Jose Diaz-Gonzalez
785ffc0e8e docs: cleanup some markdown in documentation 2023-12-18 23:47:49 -05:00
Jose Diaz-Gonzalez
3ffa5927b3 Merge pull request #6377 from dokku/dependabot/github_actions/tj-actions/changed-files-40.2.2
chore(deps): bump tj-actions/changed-files from 40.2.1 to 40.2.2
2023-12-18 23:35:50 -05:00
Jose Diaz-Gonzalez
2f8a7d894b Merge pull request #6380 from dokku/dependabot/github_actions/github/codeql-action-3
chore(deps): bump github/codeql-action from 2 to 3
2023-12-18 23:34:15 -05:00
Jose Diaz-Gonzalez
27f80a7bd2 Merge pull request #6379 from dokku/dependabot/pip/docs/_build/mkdocs-material-9.5.2
chore(deps): bump mkdocs-material from 9.5.1 to 9.5.2 in /docs/_build
2023-12-18 23:34:07 -05:00
Jose Diaz-Gonzalez
0a4b6ebbc7 Merge pull request #6378 from dokku/dependabot/docker/docs/_build/python-3.12.1-alpine
chore(deps): bump python from 3.12.0-alpine to 3.12.1-alpine in /docs/_build
2023-12-18 23:33:57 -05:00
dependabot[bot]
a7cac343d1 chore(deps): bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-14 13:14:15 +00:00
dependabot[bot]
dc8c3c3b39 chore(deps): bump mkdocs-material from 9.5.1 to 9.5.2 in /docs/_build
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.1 to 9.5.2.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.1...9.5.2)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-12 13:06:46 +00:00
dependabot[bot]
9b0ca017b5 chore(deps): bump python in /docs/_build
Bumps python from 3.12.0-alpine to 3.12.1-alpine.

---
updated-dependencies:
- dependency-name: python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 13:18:32 +00:00
dependabot[bot]
e8f803d5d8 chore(deps): bump tj-actions/changed-files from 40.2.1 to 40.2.2
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 40.2.1 to 40.2.2.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v40.2.1...v40.2.2)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 13:09:26 +00:00
Jose Diaz-Gonzalez
f31e24768d Merge pull request #6376 from dokku/dependabot/pip/docs/_build/mkdocs-material-9.5.1
chore(deps): bump mkdocs-material from 9.4.14 to 9.5.1 in /docs/_build
2023-12-09 13:37:13 -05:00
dependabot[bot]
03c51e6e36 chore(deps): bump mkdocs-material from 9.4.14 to 9.5.1 in /docs/_build
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.4.14 to 9.5.1.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.4.14...9.5.1)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-08 13:31:40 +00:00
Jose Diaz-Gonzalez
11a2c547a5 Merge pull request #6371 from dokku/dependabot/docker/tests/apps/gogrpc/golang-1.21.5
chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/gogrpc
2023-12-07 01:16:57 -05:00
Jose Diaz-Gonzalez
f3a564497c Merge pull request #6369 from dokku/dependabot/docker/tests/apps/zombies-dockerfile-tini/golang-1.21.5
chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/zombies-dockerfile-tini
2023-12-07 01:16:47 -05:00
Jose Diaz-Gonzalez
5c0c48f23e Merge pull request #6368 from dokku/dependabot/docker/tests/apps/zombies-dockerfile-no-tini/golang-1.21.5
chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/zombies-dockerfile-no-tini
2023-12-07 01:16:39 -05:00
Jose Diaz-Gonzalez
357b88e43c Merge pull request #6367 from dokku/dependabot/pip/docs/_build/importlib-metadata-7.0.0
chore(deps): bump importlib-metadata from 6.8.0 to 7.0.0 in /docs/_build
2023-12-07 01:16:33 -05:00
Jose Diaz-Gonzalez
1c0ca34d12 Merge pull request #6366 from dokku/dependabot/github_actions/tj-actions/changed-files-40.2.1
chore(deps): bump tj-actions/changed-files from 40.2.0 to 40.2.1
2023-12-07 01:16:26 -05:00
Jose Diaz-Gonzalez
58cd5cf67c Merge pull request #6370 from dokku/dependabot/docker/tests/apps/go-fail-predeploy/golang-1.21.5
chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/go-fail-predeploy
2023-12-07 01:16:16 -05:00
Jose Diaz-Gonzalez
924361a6a0 Merge pull request #6372 from dokku/dependabot/docker/tests/apps/go-fail-postdeploy/golang-1.21.5
chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/go-fail-postdeploy
2023-12-07 01:15:58 -05:00
Jose Diaz-Gonzalez
07cdf04b9c Merge pull request #6373 from dokku/dependabot/github_actions/actions/setup-python-5
chore(deps): bump actions/setup-python from 4 to 5
2023-12-07 01:15:46 -05:00
dependabot[bot]
dda38faab9 chore(deps): bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 13:53:43 +00:00
dependabot[bot]
7710dc453c chore(deps): bump golang in /tests/apps/go-fail-postdeploy
Bumps golang from 1.21.4 to 1.21.5.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 13:42:12 +00:00
dependabot[bot]
bad19bff6b chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/gogrpc
Bumps golang from 1.21.4 to 1.21.5.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 13:41:29 +00:00
dependabot[bot]
e4fe5cf232 chore(deps): bump golang in /tests/apps/go-fail-predeploy
Bumps golang from 1.21.4 to 1.21.5.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 13:23:46 +00:00
dependabot[bot]
cb793d1dd4 chore(deps): bump golang in /tests/apps/zombies-dockerfile-tini
Bumps golang from 1.21.4 to 1.21.5.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 13:16:38 +00:00
dependabot[bot]
e8d3bfd264 chore(deps): bump golang in /tests/apps/zombies-dockerfile-no-tini
Bumps golang from 1.21.4 to 1.21.5.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 13:08:34 +00:00
dependabot[bot]
555f207637 chore(deps): bump importlib-metadata from 6.8.0 to 7.0.0 in /docs/_build
Bumps [importlib-metadata](https://github.com/python/importlib_metadata) from 6.8.0 to 7.0.0.
- [Release notes](https://github.com/python/importlib_metadata/releases)
- [Changelog](https://github.com/python/importlib_metadata/blob/main/NEWS.rst)
- [Commits](https://github.com/python/importlib_metadata/compare/v6.8.0...v7.0.0)

---
updated-dependencies:
- dependency-name: importlib-metadata
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-04 13:27:55 +00:00
dependabot[bot]
6a2287714c chore(deps): bump tj-actions/changed-files from 40.2.0 to 40.2.1
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 40.2.0 to 40.2.1.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v40.2.0...v40.2.1)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-04 13:14:03 +00:00
Jose Diaz-Gonzalez
9f2132ac8f docs: cleanup doc header 2023-12-03 02:51:09 -05:00
Jose Diaz-Gonzalez
8df335fbd9 docs: correct link 2023-12-02 17:00:09 -05:00
Jose Diaz-Gonzalez
1809b3ca06 Merge pull request #6365 from dokku/deploy-docs
Split out archive/image deployment docs into their own file
2023-12-02 16:46:51 -05:00
Jose Diaz-Gonzalez
29a4679ed5 Merge pull request #6364 from dokku/dependabot/go_modules/tests/apps/gogrpc/golang.org/x/net-0.19.0
chore(deps): bump golang.org/x/net from 0.18.0 to 0.19.0 in /tests/apps/gogrpc
2023-12-02 16:46:31 -05:00
Jose Diaz-Gonzalez
46f310ceea docs: split out archive/image deployment docs into their own file 2023-12-02 16:45:56 -05:00
dependabot[bot]
261a8e53ed chore(deps): bump golang.org/x/net in /tests/apps/gogrpc
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.18.0 to 0.19.0.
- [Commits](https://github.com/golang/net/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 13:53:52 +00:00
Jose Diaz-Gonzalez
9c7205c301 Merge pull request #6361 from dokku/dependabot/pip/docs/_build/pymdown-extensions-10.5
chore(deps): bump pymdown-extensions from 10.4 to 10.5 in /docs/_build
2023-11-27 10:58:26 -05:00
Jose Diaz-Gonzalez
af835370d2 Merge pull request #6362 from dokku/dependabot/pip/docs/_build/mkdocs-material-9.4.14
chore(deps): bump mkdocs-material from 9.4.12 to 9.4.14 in /docs/_build
2023-11-27 10:58:11 -05:00
Jose Diaz-Gonzalez
4d24d7f6af Merge pull request #6360 from dokku/dependabot/github_actions/tj-actions/changed-files-40.2.0
chore(deps): bump tj-actions/changed-files from 40.1.1 to 40.2.0
2023-11-27 10:57:58 -05:00
dependabot[bot]
e0bbef23e7 chore(deps): bump mkdocs-material from 9.4.12 to 9.4.14 in /docs/_build
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.4.12 to 9.4.14.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.4.12...9.4.14)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 13:42:42 +00:00
dependabot[bot]
8eb497f835 chore(deps): bump pymdown-extensions from 10.4 to 10.5 in /docs/_build
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 10.4 to 10.5.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](https://github.com/facelessuser/pymdown-extensions/compare/10.4...10.5)

---
updated-dependencies:
- dependency-name: pymdown-extensions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 13:42:33 +00:00
dependabot[bot]
1c807a8f0c chore(deps): bump tj-actions/changed-files from 40.1.1 to 40.2.0
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 40.1.1 to 40.2.0.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v40.1.1...v40.2.0)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 13:36:31 +00:00
Jose Diaz-Gonzalez
b12c25f72d Merge pull request #6359 from dokku/josegonzalez-patch-1
Update buildpack api for test buildpack
2023-11-25 18:32:49 -05:00
Jose Diaz-Gonzalez
343032fcf8 chore: update command 2023-11-25 03:43:16 -05:00
Jose Diaz-Gonzalez
463601fb1c fix: update command 2023-11-25 03:42:59 -05:00
Jose Diaz-Gonzalez
20ee524067 chore: remove deprecated stacks 2023-11-25 03:41:36 -05:00
Jose Diaz-Gonzalez
2e22f49898 chore: drop deprecated 2023-11-25 03:41:21 -05:00
Jose Diaz-Gonzalez
d301f68b90 Merge pull request #6357 from dokku/dependabot/pip/docs/_build/mkdocs-material-extensions-1.3.1
chore(deps): bump mkdocs-material-extensions from 1.3 to 1.3.1 in /docs/_build
2023-11-24 19:42:29 -05:00
Jose Diaz-Gonzalez
ab6efcfcda chore: update buildpack api for test buildpack 2023-11-24 19:42:18 -05:00
Jose Diaz-Gonzalez
619d898051 chore: update buildpack api for test buildpack 2023-11-24 19:41:26 -05:00
dependabot[bot]
1e3f130432 chore(deps): bump mkdocs-material-extensions in /docs/_build
Bumps [mkdocs-material-extensions](https://github.com/facelessuser/mkdocs-material-extensions) from 1.3 to 1.3.1.
- [Release notes](https://github.com/facelessuser/mkdocs-material-extensions/releases)
- [Changelog](https://github.com/facelessuser/mkdocs-material-extensions/blob/master/changelog.md)
- [Commits](https://github.com/facelessuser/mkdocs-material-extensions/compare/1.3...1.3.1)

---
updated-dependencies:
- dependency-name: mkdocs-material-extensions
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-25 00:39:43 +00:00
Jose Diaz-Gonzalez
1983feaba5 Merge pull request #6355 from dokku/dependabot/pip/docs/_build/pygments-2.17.2
chore(deps): bump pygments from 2.16.1 to 2.17.2 in /docs/_build
2023-11-24 19:39:25 -05:00
Jose Diaz-Gonzalez
0e8e2fcc8e Merge pull request #6358 from dokku/dependabot/pip/docs/_build/mkdocs-material-9.4.12
chore(deps): bump mkdocs-material from 9.4.8 to 9.4.12 in /docs/_build
2023-11-24 19:39:07 -05:00
dependabot[bot]
17170fbb82 chore(deps): bump mkdocs-material from 9.4.8 to 9.4.12 in /docs/_build
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.4.8 to 9.4.12.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.4.8...9.4.12)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-24 13:42:46 +00:00
dependabot[bot]
c589c184ba chore(deps): bump pygments from 2.16.1 to 2.17.2 in /docs/_build
Bumps [pygments](https://github.com/pygments/pygments) from 2.16.1 to 2.17.2.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](https://github.com/pygments/pygments/compare/2.16.1...2.17.2)

---
updated-dependencies:
- dependency-name: pygments
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-22 13:30:00 +00:00
Jose Diaz-Gonzalez
eab5ad191f Merge pull request #6348 from dokku/dependabot/pip/docs/_build/pymdown-extensions-10.4
chore(deps): bump pymdown-extensions from 10.3.1 to 10.4 in /docs/_build
2023-11-13 15:55:14 -05:00
dependabot[bot]
d219f82bf1 chore(deps): bump pymdown-extensions from 10.3.1 to 10.4 in /docs/_build
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 10.3.1 to 10.4.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](https://github.com/facelessuser/pymdown-extensions/compare/10.3.1...10.4)

---
updated-dependencies:
- dependency-name: pymdown-extensions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-13 13:35:16 +00:00
247 changed files with 10575 additions and 1158 deletions

View File

@@ -1,12 +1,21 @@
#!/usr/bin/env bash
export GOWORK=off
pushd /root/go/src/github.com/dokku/dokku/plugins/ >/dev/null || exit 1
for plugin in *; do
if [[ ! -f "/root/go/src/github.com/dokku/dokku/plugins/$plugin/go.mod" ]]; then continue; fi
echo "$plugin"
pushd /root/go/src/github.com/dokku/dokku/plugins/$plugin || exit 1
go mod tidy
go mod download
echo "running go mod tidy for $plugin"
if ! go mod tidy; then
echo "go mod tidy failed for $plugin"
exit 1
fi
echo "running go mod download for $plugin"
if ! go mod download; then
echo "go mod download failed for $plugin"
exit 1
fi
popd >/dev/null || exit 1
done
popd >/dev/null || exit 1

View File

@@ -3,27 +3,7 @@
install-go-devtools() {
go install github.com/go-delve/delve/cmd/dlv@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
}
install-go-mods() {
local plugin_root="/root/go/src/github.com/dokku/dokku/plugins"
export GO111MODULE=off
echo "-----> Fetching onsi/gomega dependency for tests"
go get github.com/onsi/gomega || true
echo "-----> Fetching spf13/pflag dependency for subcommands"
go get github.com/spf13/pflag || true
pushd "$plugin_root" >/dev/null || true
find "$plugin_root/" -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
pushd "$plugin_root/$plugin" >/dev/null || true
if [[ -f "go.mod" ]]; then
echo "-----> Fetching dependencies for $plugin plugin"
go get || true
fi
popd >/dev/null || true
done
popd >/dev/null || true
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
}
setup-ci() {
@@ -34,7 +14,6 @@ setup-ci() {
}
main() {
install-go-mods
install-go-devtools
setup-ci
}

View File

@@ -13,18 +13,25 @@
"golang.go",
"mads-hartmann.bash-ide-vscode",
"ms-vscode.makefile-tools",
"sleistner.vscode-fileutils"
"sleistner.vscode-fileutils",
"ms-azuretools.vscode-docker"
]
}
},
"initializeCommand": ["mkdir", "-p", "tmp/data"],
"initializeCommand": [
"mkdir",
"-p",
"tmp/data"
],
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
"source=${localWorkspaceFolder}/tmp/data/,target=/mnt/dokku/,type=bind"
],
"overrideCommand": false,
"postCreateCommand": "setup-dev-env",
"runArgs": ["--init"],
"runArgs": [
"--init"
],
"workspaceFolder": "/root/go/src/github.com/dokku/dokku",
"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/root/go/src/github.com/dokku/dokku,consistency=cached"
}

View File

@@ -19,3 +19,6 @@ indent_size = 4
insert_final_newline = true
indent_style = tab
indent_size = 4
[*.md]
tab_width = 4

View File

@@ -218,10 +218,6 @@ updates:
open-pull-requests-limit: 10
labels:
- "type: dependencies"
ignore:
- dependency-name: google.golang.org/grpc
versions:
- "> 1.29.1"
- package-ecosystem: pip
directory: "/tests/apps/multi"
schedule:

View File

@@ -3,3 +3,6 @@ extends: default
rules:
line-length: disable
ignore:
- plugins/scheduler-k3s/templates/*

View File

@@ -19,7 +19,7 @@ env:
jobs:
check-commit:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
skip: ${{ steps.check-commit.outputs.skip }}
@@ -43,7 +43,7 @@ jobs:
build:
name: build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: check-commit
if: ${{ needs.check-commit.outputs.skip != 'true' }}
outputs:
@@ -83,7 +83,7 @@ jobs:
build-image-amd64:
name: build-image.linux/amd64
needs: build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
@@ -111,7 +111,7 @@ jobs:
unit-tests:
name: unit.${{ matrix.index }}
needs: build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix: ${{fromJson(needs.build.outputs.matrix)}}
@@ -151,7 +151,7 @@ jobs:
docker-deploy-tests:
name: docker
needs: build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
@@ -177,7 +177,7 @@ jobs:
go-tests:
name: go.${{ matrix.index }}
needs: build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
@@ -218,7 +218,7 @@ jobs:
publish-test-results:
name: publish-test-results
needs: unit-tests
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
checks: write
# the build-and-test job might be skipped, we don't need to run this job then

View File

@@ -30,7 +30,7 @@ concurrency:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
@@ -44,9 +44,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
# workaround for https://github.com/github/codeql/issues/14235
- name: Remove go.work file
run: rm go.work
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -57,7 +61,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -66,9 +70,5 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language
# - run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

View File

@@ -13,7 +13,7 @@ concurrency:
jobs:
deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Cloning repo
uses: actions/checkout@v4
@@ -21,7 +21,7 @@ jobs:
fetch-depth: 0
- name: "Setup python 3.10"
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

View File

@@ -17,7 +17,7 @@ concurrency:
jobs:
hadolint:
name: hadolint
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4
@@ -27,7 +27,7 @@ jobs:
markdown-lint:
name: markdown-lint
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4
@@ -44,7 +44,7 @@ jobs:
packer:
name: packer
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -58,7 +58,7 @@ jobs:
PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get changed files in the docs folder
id: changed-files-specific
uses: tj-actions/changed-files@v40.1.1
uses: tj-actions/changed-files@v42.0.2
with:
files: contrib/images/digitalocean/**
- name: Run `packer validate`
@@ -69,7 +69,7 @@ jobs:
shellcheck:
name: shellcheck
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4
@@ -79,7 +79,7 @@ jobs:
shfmt:
name: shfmt
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4
@@ -93,7 +93,7 @@ jobs:
yamllint:
name: yamllint
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v4

View File

@@ -1,19 +1,25 @@
---
name: 'release'
name: "release"
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release type [build, betafish, patch, minor, major]'
description: "Release type"
default: "patch"
required: true
default: 'build'
type: choice
options:
- patch
- minor
- major
- build
- betafish
jobs:
release:
name: release
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
outputs:
@@ -25,7 +31,7 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
ruby-version: 2.7
- name: login to docker hub
uses: docker/login-action@v3
@@ -74,7 +80,7 @@ jobs:
build-digitalocean:
name: build-digitalocean
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: release
steps:
- name: Checkout code
@@ -110,7 +116,7 @@ jobs:
bump-azure:
name: bump-azure
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: release
steps:
- name: Checkout code

1
.gitignore vendored
View File

@@ -12,3 +12,4 @@ stack.tgz
tmp
coverage.out
site
go.work.sum

24
.golangci-lint.yml Normal file
View File

@@ -0,0 +1,24 @@
---
run:
timeout: 5m
linters:
disable-all: true
enable:
- errcheck
- goconst
- gocyclo
- gofumpt
- gosec
- gosimple
- govet
- ineffassign
- misspell
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused
- whitespace

1
.prettierignore Normal file
View File

@@ -0,0 +1 @@
*.md

View File

@@ -1,5 +1,227 @@
# History
## 0.33.2
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.33.2/bootstrap.sh
sudo DOKKU_TAG=v0.33.2 bash bootstrap.sh
```
### Bug Fixes
- #6535: @josegonzalez Properly fetch default vector image if none is passed
- #6533: @josegonzalez Ensure all k3s traefik middleware resources are scoped to the process
- #6524: @josegonzalez Ensure all copied files always have line endings converted to unix-style
### New Features
- #6537: @josegonzalez Add the dokku logo as the chart icon
- #6527: @josegonzalez Upgrade vector image to 0.35.x
- #6534: @josegonzalez Allow specifying an ingress class via chart value
### Documentation
- #6530: @josegonzalez Fix indentation on letsencrypt sections for k3s scheduler docs
### Tests
- #6532: @josegonzalez Correct issues in tests for vector image log property
### Dependencies
- #6540: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.5 to 9.5.6 in /docs/_build
- #6538: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 42.0.1 to 42.0.2
- #6528: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 42.0.0 to 42.0.1
- #6529: @dependabot[bot] chore(deps): bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /tests/apps/gogrpc
### Other
- #6526: @josegonzalez Allow setting the vector image as a global property
## 0.33.1
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.33.1/bootstrap.sh
sudo DOKKU_TAG=v0.33.1 bash bootstrap.sh
```
### Bug Fixes
- #6520: @josegonzalez Guard against missing healthcheck config
- #6519: @josegonzalez Use correct name for cluster-issuers helm chart
### Refactors
- #6521: @josegonzalez Install traefik via helm chart directly to avoid issues where traefik silently fails installation
### Dependencies
- #6523: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.4 to 9.5.5 in /docs/_build
- #6522: @dependabot[bot] chore(deps): bump google.golang.org/grpc from 1.60.1 to 1.61.0 in /tests/apps/gogrpc
## 0.33.0
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.33.0/bootstrap.sh
sudo DOKKU_TAG=v0.33.0 bash bootstrap.sh
```
### Bug Fixes
- #6466: @josegonzalez Use correct key for migrating global scheduler configuration on upgrade
- #6450: @josegonzalez Always set -- on docker run commands internally to avoid parsing flags on specified commands
- #6447: @josegonzalez Propagate arm64 build support for development builds
- #6445: @josegonzalez Do not strip whitespace when displaying a file for debugging purposes
- #6442: @josegonzalez Ignore go.work when bumping modules
- #6427: @josegonzalez Add missing gitignore entry for app-json trigger
### New Features
- #6500: @josegonzalez Add support for custom user namespaces when creating persistent storage directories
- #6492: @josegonzalez Add support for multierror when exiting triggers
- #6491: @josegonzalez Add wrappers for exec and ssh commands
- #6489: @josegonzalez Disable flag parsing for dokku enter
- #6469: @josegonzalez Allow generating an ssh deploy key via the git plugin
- #6468: @josegonzalez Implement global support for setting proxy type
- #6467: @josegonzalez Add ability to customize the registry repo with a template
- #6464: @josegonzalez Create helper function for exposing a docker image's working directory
- #6462: @josegonzalez Ensure ps:stop has a proper cli header
- #6460: @josegonzalez Add a post-registry-login trigger
- #6459: @josegonzalez Alias common registry names to docker.io
- #6457: @josegonzalez Add the ability to specify the output format when listing ports
- #6452: @josegonzalez Add alternative implementation for calling plugin triggers
- #6446: @josegonzalez Add support for global-only environment properties
- #6443: @josegonzalez Add support for exposing healthchecks in the AppJson struct
- #6435: @josegonzalez Implement native k3s scheduler support
- #6433: @josegonzalez Add go.work.sum to gitignore
- #6432: @josegonzalez Upgrade golang to 1.21.6
- #6430: @josegonzalez Reformat devcontainer file
- #6428: @josegonzalez Add ms-azuretools.vscode-docker to devcontainer setup
- #6313: @josegonzalez Set the platform flag in order to run amd64 images on arm64 deploy targets
### Refactors
- #6448: @josegonzalez Return an int32 for scale count
- #6444: @josegonzalez Allow setting a custom mode when writing a slice to a file
### Documentation
- #6517: @josegonzalez Remove k3s tutorial from documentation
- #6516: @josegonzalez Note that the external kubernetes plugin is deprecated
- #6515: @josegonzalez Replace the kubernetes plugin with k3s in the documentation
- #6514: @josegonzalez Add notes on k3s replacement of the scheduler-kubernetes plugin
- #6461: @josegonzalez Add documentation for implementing scheduler-related commands
- #6458: @josegonzalez Add docblocks to appjson structs
- #6420: @aochagavia Fix typo in zero downtime documentation
### Tests
- #6465: @josegonzalez Update haproxy tests so they pass
- #6449: @josegonzalez Run ci on ubuntu 22.04
- #6431: @josegonzalez Add golanglint-ci testing support
### Dependencies
- #6513: @dependabot[bot] chore(deps): bump github.com/containerd/containerd from 1.7.6 to 1.7.11 in /plugins/scheduler-k3s
- #6512: @josegonzalez Update github.com/gonsi/gomega golang dependency
- #6511: @josegonzalez Update crypto and sys golang dependencies
- #6494: @dependabot[bot] chore(deps): bump markupsafe from 2.1.3 to 2.1.4 in /docs/_build
- #6482: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.3 to 9.5.4 in /docs/_build
- #6478: @dependabot[bot] chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/zombies-dockerfile-tini
- #6456: @dependabot[bot] chore(deps): bump google.golang.org/grpc from 1.29.1 to 1.60.1 in /tests/apps/gogrpc
- #6454: @dependabot[bot] chore(deps): bump flask from 3.0.0 to 3.0.1 in /tests/apps/python-flask
- #6455: @dependabot[bot] chore(deps): bump flask from 3.0.0 to 3.0.1 in /tests/apps/multi
- #6453: @josegonzalez Remove ignored dependency from dependabot
- #6451: @josegonzalez Update go modules
- #6439: @dependabot[bot] chore(deps): bump github.com/onsi/gomega from 1.30.0 to 1.31.0 in /plugins/config
- #6438: @dependabot[bot] chore(deps): bump github.com/onsi/gomega from 1.30.0 to 1.31.0 in /plugins/common
- #6437: @dependabot[bot] chore(deps): bump beautifulsoup4 from 4.12.2 to 4.12.3 in /docs/_build
- #6436: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 41.1.1 to 42.0.0
- #6425: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 41.0.1 to 41.1.1
- #6424: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.3 to 9.5.4 in /docs/_build
- #6421: @josegonzalez chore: bump golang.org/x/sync from 0.5.0 to 0.6.0
- #6419: @dependabot[bot] chore(deps): bump jinja2 from 3.1.2 to 3.1.3 in /docs/_build
- #6418: @dependabot[bot] chore(deps): bump jinja2 from 3.1.2 to 3.1.3 in /tests/apps/python-flask
- #6415: @dependabot[bot] chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/go-fail-postdeploy
- #6414: @dependabot[bot] chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/gogrpc
- #6413: @dependabot[bot] chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/go-fail-predeploy
- #6412: @dependabot[bot] chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/zombies-dockerfile-no-tini
- #6411: @dependabot[bot] chore(deps): bump golang from 1.21.5 to 1.21.6 in /tests/apps/zombies-dockerfile-tini
- #6410: @dependabot[bot] chore(deps): bump golang.org/x/net from 0.19.0 to 0.20.0 in /tests/apps/gogrpc
- #6406: @dependabot[bot] chore(deps): bump golang.org/x/sync from 0.5.0 to 0.6.0 in /plugins/scheduler-docker-local
### Other
- #6463: @josegonzalez Use exported function from appjson module instead of manually parsing
- #6429: @josegonzalez Use go.work for development purposes
## 0.32.4
Install/update via the bootstrap script:
```shell
wget -NP . https://dokku.com/install/v0.32.4/bootstrap.sh
sudo DOKKU_TAG=v0.32.4 bash bootstrap.sh
```
### Bug Fixes
- #6407: @josegonzalez Upgrade ruby to fix the release process
- #6394: @josegonzalez Scope the delete of symlinked plugins in debian post-install to the plugin folders
### Refactors
- #6388: @Juneezee Replace deprecated `io/ioutil` functions
### Documentation
- #6385: @josegonzalez Fix docblock entries for properties in plugins
- #6384: @josegonzalez Cleanup some markdown in documentation
- #6365: @josegonzalez Split out archive/image deployment docs into their own file
### Tests
- #6408: @josegonzalez Add options to the release workflow
- #6359: @josegonzalez Update buildpack api for test buildpack
### Dependencies
- #6399: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.5 to 10.7 in /docs/_build
- #6398: @dependabot[bot] chore(deps): bump sinatra from 3.1.0 to 3.2.0 in /tests/apps/ruby
- #6395: @dependabot[bot] chore(deps): bump ruby from 3.2.2 to 3.3.0 in /tests/apps/dockerfile-entrypoint
- #6391: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.2 to 9.5.3 in /docs/_build
- #6392: @dependabot[bot] chore(deps): bump importlib-metadata from 7.0.0 to 7.0.1 in /docs/_build
- #6393: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 40.2.3 to 41.0.1
- #6387: @dependabot[bot] chore(deps): bump org.eclipse.jetty:jetty-servlet from 11.0.18 to 11.0.19 in /tests/apps/java
- #6386: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 40.2.2 to 40.2.3
- #6377: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 40.2.1 to 40.2.2
- #6380: @dependabot[bot] chore(deps): bump github/codeql-action from 2 to 3
- #6379: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.1 to 9.5.2 in /docs/_build
- #6378: @dependabot[bot] chore(deps): bump python from 3.12.0-alpine to 3.12.1-alpine in /docs/_build
- #6376: @dependabot[bot] chore(deps): bump mkdocs-material from 9.4.14 to 9.5.1 in /docs/_build
- #6371: @dependabot[bot] chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/gogrpc
- #6369: @dependabot[bot] chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/zombies-dockerfile-tini
- #6368: @dependabot[bot] chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/zombies-dockerfile-no-tini
- #6367: @dependabot[bot] chore(deps): bump importlib-metadata from 6.8.0 to 7.0.0 in /docs/_build
- #6366: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 40.2.0 to 40.2.1
- #6370: @dependabot[bot] chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/go-fail-predeploy
- #6372: @dependabot[bot] chore(deps): bump golang from 1.21.4 to 1.21.5 in /tests/apps/go-fail-postdeploy
- #6373: @dependabot[bot] chore(deps): bump actions/setup-python from 4 to 5
- #6364: @dependabot[bot] chore(deps): bump golang.org/x/net from 0.18.0 to 0.19.0 in /tests/apps/gogrpc
- #6361: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.4 to 10.5 in /docs/_build
- #6362: @dependabot[bot] chore(deps): bump mkdocs-material from 9.4.12 to 9.4.14 in /docs/_build
- #6360: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 40.1.1 to 40.2.0
- #6357: @dependabot[bot] chore(deps): bump mkdocs-material-extensions from 1.3 to 1.3.1 in /docs/_build
- #6355: @dependabot[bot] chore(deps): bump pygments from 2.16.1 to 2.17.2 in /docs/_build
- #6358: @dependabot[bot] chore(deps): bump mkdocs-material from 9.4.8 to 9.4.12 in /docs/_build
- #6348: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.3.1 to 10.4 in /docs/_build
## 0.32.3
Install/update via the bootstrap script:

View File

@@ -86,8 +86,8 @@ Otherwise, you will need to import the keypair manually after installation using
To install the latest stable release, run the following commands as a user who has access to `sudo`:
```shell
wget -NP . https://dokku.com/install/v0.32.3/bootstrap.sh
sudo DOKKU_TAG=v0.32.3 bash bootstrap.sh
wget -NP . https://dokku.com/install/v0.33.2/bootstrap.sh
sudo DOKKU_TAG=v0.33.2 bash bootstrap.sh
```
You can then proceed to configure your server domain (via `dokku domains:set-global`) and user access (via `dokku ssh-keys:add`) to complete the installation.

View File

@@ -1,7 +1,7 @@
GO_ARGS ?=
GO_PLUGIN_MAKE_TARGET ?= build
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
BUILD_IMAGE := golang:1.21.3
BUILD_IMAGE := golang:1.21.6
GO_BUILD_CACHE ?= /tmp/dokku-go-build-cache
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
GO_ROOT_MOUNT ?= $$PWD/../..:$(GO_REPO_ROOT)
@@ -21,17 +21,17 @@ build-in-docker: clean
-e GO111MODULE=on \
-w $(GO_REPO_ROOT)/plugins/$(PLUGIN_NAME) \
$(BUILD_IMAGE) \
bash -c "GO_ARGS='$(GO_ARGS)' CGO_ENABLED=0 GOOS=linux GOARCH=$(GOARCH) make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
bash -c "GO_ARGS='$(GO_ARGS)' CGO_ENABLED=0 GOOS=linux GOARCH=$(GOARCH) GOWORK=off make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
clean:
rm -rf $(BUILD)
find . -xtype l -delete
commands: **/**/commands.go
go build -ldflags="-s -w" $(GO_ARGS) -o commands src/commands/commands.go
GOARCH=$(GOARCH) go build -ldflags="-s -w" $(GO_ARGS) -o commands src/commands/commands.go
subcommands:
go build -ldflags="-s -w" $(GO_ARGS) -o subcommands/subcommands src/subcommands/subcommands.go
GOARCH=$(GOARCH) go build -ldflags="-s -w" $(GO_ARGS) -o subcommands/subcommands src/subcommands/subcommands.go
$(MAKE) $(SUBCOMMANDS)
subcommands/%:
@@ -41,7 +41,7 @@ src-clean:
rm -rf .gitignore src vendor Makefile *.go glide.* go.sum go.mod
triggers:
go build -ldflags="-s -w" $(GO_ARGS) -o triggers src/triggers/triggers.go
GOARCH=$(GOARCH) go build -ldflags="-s -w" $(GO_ARGS) -o triggers src/triggers/triggers.go
$(MAKE) $(TRIGGERS)
triggers/%:

4
debian/control vendored
View File

@@ -1,9 +1,9 @@
Package: dokku
Version: 0.32.3
Version: 0.33.2
Section: web
Priority: optional
Architecture: amd64
Depends: apache2-utils, locales, git, cpio, curl, man-db, netcat, sshcommand, docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-compose-plugin | moby-compose, docker-buildx-plugin | moby-buildx, docker-container-healthchecker, docker-image-labeler, lambda-builder, net-tools, netrc, software-properties-common, parallel, procfile-util, python-software-properties | python3-software-properties, rsync, rsyslog, dos2unix, jq, unzip, util-linux
Depends: apache2-utils, acl, locales, git, cpio, curl, man-db, netcat, sshcommand, docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-compose-plugin | moby-compose, docker-buildx-plugin | moby-buildx, docker-container-healthchecker, docker-image-labeler, lambda-builder, net-tools, netrc, software-properties-common, parallel, procfile-util, python-software-properties | python3-software-properties, rsync, rsyslog, dos2unix, jq, unzip, util-linux
Recommends: herokuish, bash-completion, dokku-update, dokku-event-listener
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn, sudo, python3, debconf
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>

3
debian/postinst vendored
View File

@@ -84,7 +84,8 @@ setup-plugins() {
PLUGIN_PATH="${DOKKU_LIB_ROOT}/plugins" plugn enable "$plugin"
fi
done
find -L "${DOKKU_LIB_ROOT}" -type l -delete
find -L "${DOKKU_LIB_ROOT}/core-plugins" -type l -delete
find -L "${DOKKU_LIB_ROOT}/plugins" -type l -delete
chown dokku:dokku -R "${DOKKU_LIB_ROOT}/plugins" "${DOKKU_LIB_ROOT}/core-plugins"
echo "Install all core plugins"

View File

@@ -1,4 +1,4 @@
FROM python:3.12.0-alpine
FROM python:3.12.1-alpine
WORKDIR /usr/src/app

View File

@@ -1,18 +1,18 @@
beautifulsoup4==4.12.2
beautifulsoup4==4.12.3
click==8.1.7
ghp-import==2.1.0
importlib-metadata==6.8.0
Jinja2==3.1.2
importlib-metadata==7.0.1
Jinja2==3.1.3
Markdown>=3.2.1,<3.6
MarkupSafe==2.1.3
MarkupSafe==2.1.4
mergedeep==1.3.4
mkdocs==1.5.3
mkdocs-exclude==1.0.2
mkdocs-material==9.4.8
mkdocs-material-extensions==1.3
mkdocs-material==9.5.6
mkdocs-material-extensions==1.3.1
packaging==23.2
Pygments==2.16.1
pymdown-extensions==10.3.1
Pygments==2.17.2
pymdown-extensions==10.7
pyparsing==3.1.1
python-dateutil==2.8.2
PyYAML==6.0.1

View File

@@ -76,6 +76,8 @@ By default, permissions are set for usage with Herokuish buildpacks. These permi
- This is used for apps deployed with Cloud Native Buildpacks using the `heroku/builder` builder.
- `--chown packeto`: Use `2000:2000` as the folder permissions.
- This is used for apps deployed with Cloud Native Buildpacks using the `cloudfoundry/cnb` or `packeto` builders.
- `--chown root`: Use `0:0` as the folder permissions.
- This is used for containers that run their processes as root, as is typical for most Dockerfile or Docker image deploys.
- `--chown false`: Skips the `chown` call.
Users deploying via Dockerfile will want to specify `--chown false` and manually `chown` the created directory if the user and/or group id of the runnning process in the deployed container do not correspond to any of the above options.

View File

@@ -36,35 +36,35 @@ dokku plugin:list
```
plugn: dev
00_dokku-standard 0.32.3 enabled dokku core standard plugin
20_events 0.32.3 enabled dokku core events logging plugin
app-json 0.32.3 enabled dokku core app-json plugin
apps 0.32.3 enabled dokku core apps plugin
build-env 0.32.3 enabled dokku core build-env plugin
buildpacks 0.32.3 enabled dokku core buildpacks plugin
certs 0.32.3 enabled dokku core certificate management plugin
checks 0.32.3 enabled dokku core checks plugin
common 0.32.3 enabled dokku core common plugin
config 0.32.3 enabled dokku core config plugin
docker-options 0.32.3 enabled dokku core docker-options plugin
domains 0.32.3 enabled dokku core domains plugin
enter 0.32.3 enabled dokku core enter plugin
git 0.32.3 enabled dokku core git plugin
logs 0.32.3 enabled dokku core logs plugin
network 0.32.3 enabled dokku core network plugin
nginx-vhosts 0.32.3 enabled dokku core nginx-vhosts plugin
plugin 0.32.3 enabled dokku core plugin plugin
proxy 0.32.3 enabled dokku core proxy plugin
ps 0.32.3 enabled dokku core ps plugin
repo 0.32.3 enabled dokku core repo plugin
resource 0.32.3 enabled dokku core resource plugin
scheduler-docker-local 0.32.3 enabled dokku core scheduler-docker-local plugin
shell 0.32.3 enabled dokku core shell plugin
ssh-keys 0.32.3 enabled dokku core ssh-keys plugin
storage 0.32.3 enabled dokku core storage plugin
tags 0.32.3 enabled dokku core tags plugin
tar 0.32.3 enabled dokku core tar plugin
trace 0.32.3 enabled dokku core trace plugin
00_dokku-standard 0.33.2 enabled dokku core standard plugin
20_events 0.33.2 enabled dokku core events logging plugin
app-json 0.33.2 enabled dokku core app-json plugin
apps 0.33.2 enabled dokku core apps plugin
build-env 0.33.2 enabled dokku core build-env plugin
buildpacks 0.33.2 enabled dokku core buildpacks plugin
certs 0.33.2 enabled dokku core certificate management plugin
checks 0.33.2 enabled dokku core checks plugin
common 0.33.2 enabled dokku core common plugin
config 0.33.2 enabled dokku core config plugin
docker-options 0.33.2 enabled dokku core docker-options plugin
domains 0.33.2 enabled dokku core domains plugin
enter 0.33.2 enabled dokku core enter plugin
git 0.33.2 enabled dokku core git plugin
logs 0.33.2 enabled dokku core logs plugin
network 0.33.2 enabled dokku core network plugin
nginx-vhosts 0.33.2 enabled dokku core nginx-vhosts plugin
plugin 0.33.2 enabled dokku core plugin plugin
proxy 0.33.2 enabled dokku core proxy plugin
ps 0.33.2 enabled dokku core ps plugin
repo 0.33.2 enabled dokku core repo plugin
resource 0.33.2 enabled dokku core resource plugin
scheduler-docker-local 0.33.2 enabled dokku core scheduler-docker-local plugin
shell 0.33.2 enabled dokku core shell plugin
ssh-keys 0.33.2 enabled dokku core ssh-keys plugin
storage 0.33.2 enabled dokku core storage plugin
tags 0.33.2 enabled dokku core tags plugin
tar 0.33.2 enabled dokku core tar plugin
trace 0.33.2 enabled dokku core trace plugin
```
> [!WARNING]

View File

@@ -99,9 +99,19 @@ Setting the property value to an empty string will reset the value to the system
```shell
# per-app
dokku registry:set node-js-app push-on-release
dokku registry:set node-js-app image-repo
```
### Templating the image repository name
Instead of setting the image repository name on a per-app basis, it can be set via a template globally with the `image-repo-template` property:
```shell
dokku registry:set --global image-repo-template "my-awesome-prefix/{{ .AppName }}"
```
Dokku uses a Golang template and has access to the `AppName` variable as shown above.
### Pushing images on build
To push the image on release, set the `push-on-release` property to `true` via the `registry:set` command. The default value for this property is `false`. Setting the property to `true` will result in the image being tagged with an ID that is incremented with every release. This tag will be what is used for running app code.

View File

@@ -2,10 +2,10 @@
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/mstile-310x150.png"/>
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/mstile-310x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>

View File

@@ -2,37 +2,37 @@
"name": "Dokku",
"icons": [
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.32.3\/docs\/assets\/favicons\/android-chrome-36x36.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.33.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.32.3\/docs\/assets\/favicons\/android-chrome-48x48.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.33.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.32.3\/docs\/assets\/favicons\/android-chrome-72x72.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.33.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.32.3\/docs\/assets\/favicons\/android-chrome-96x96.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.33.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.32.3\/docs\/assets\/favicons\/android-chrome-144x144.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.33.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.32.3\/docs\/assets\/favicons\/android-chrome-192x192.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.33.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"

View File

@@ -29,6 +29,7 @@
"0.29.4",
"0.30.11",
"0.31.5",
"0.32.3"
"0.32.4",
"0.33.2"
]
}

View File

@@ -50,7 +50,6 @@ The following plugins are available and provided by Dokku maintainers. Please f
| [Scheduler Kubernetes](https://github.com/dokku/dokku-scheduler-kubernetes) | [dokku][] | 0.4.0+ |
| [Scheduler Nomad](https://github.com/dokku/dokku-scheduler-nomad) | [dokku][] | 0.4.0+ |
| [Solr](https://github.com/dokku/dokku-solr) | [dokku][] | 0.4.0+ |
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys) | [dokku][] | 0.4.0+ |
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin) | [dokku][] | 0.4.0+ |
| [Typesense](https://github.com/dokku/dokku-typesense) | [dokku][] | 0.4.0+ |
@@ -202,6 +201,7 @@ The following plugins have been removed as their functionality is now in Dokku C
| [Process Manager: Supervisord](https://github.com/statianzo/dokku-supervisord) | [statianzo][] | v0.3.14/0.7.0 (ps plugin) |
| [Rebuild application](https://github.com/scottatron/dokku-rebuild) | [scottatron][] | v0.3.14 (ps plugin) |
| [Reset mtime](https://github.com/mixxorz/dokku-docker-reset-mtime) | [mixxorz][] | Docker 1.8+ |
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys) | [dokku][] | v0.33.0 (git plugin) |
| [Supply env vars to buildpacks](https://github.com/cameron-martin/dokku-build-env)<sup>2</sup> | [cameron-martin][] | v0.3.9 (build-env plugin) |
| [Slack Notifications](https://github.com/ribot/dokku-slack) | [ribot][] | v0.5.0 (deployment tasks) |
| [Telegram Notifications](https://github.com/m0rth1um/dokku-telegram) | [m0rth1um][] | v0.5.0 (deployment tasks) |

View File

@@ -13,7 +13,7 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Cloning repo
uses: actions/checkout@v3

View File

@@ -155,6 +155,27 @@ dokku logs:vector-logs --tail --num 10
The above command will show logs continually from the vector container, with an initial history of 10 log lines
#### Changing the vector image
Dokku integrates with a Vector docker image version that is known to be compatible with the documentation. In some cases, it may be useful to specify an alternative image version. To do so, set the global `vector-image` property.
```shell
dokku logs:set --global vector-image timberio/vector:0.35.X-debian
```
Once set, the vector container will need to be stopped and then started. Note that specifying the `--vector-image` flag on the `logs:vector-start` will override the setting.
```shell
dokku logs:vector-stop
dokku logs:vector-start
```
Setting this to an empty string will reset the version to the version currently compatible with the Dokku installation.
```shell
dokku logs:set --global vector-image
```
#### Configuring a log sink
Vector uses the concept of log "sinks" to send logs to a given endpoint. Log sinks may be configured globally or on a per-app basis by specifying a `vector-sink` in DSN form with the `logs:set` command. Specifying a sink value will reload any running vector container.

View File

@@ -0,0 +1,34 @@
# Tar and Zip Archives
## Initializing an app repository from an archive file
> [!IMPORTANT]
> New as of 0.24.0
A Dokku app repository can be initialized or updated from the contents of an archive file via the `git:from-archive` command. This is an excellent way of tracking changes when deploying pre-built binary archives, such as java jars or go binaries. This can also be useful when deploying directly from a GitHub repository at a specific commit.
```shell
dokku git:from-archive node-js-app https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar
```
In the above example, Dokku will build the app as if the repository contained the extracted contents of the specified archive file.
Triggering a build with the same archive file multiple times will result in Dokku exiting `0` early as there will be no changes detected.
The `git:from-archive` command can optionally take a git `user.name` and `user.email` argument (in that order) to customize the author. If the arguments are left empty, they will fallback to `Dokku` and `automated@dokku.sh`, respectively.
```shell
dokku git:from-archive node-js-app https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar "Camila" "camila@example.com"
```
The default archive type is always set to `.tar`. To use a different archive type, specify the `--archive-type` flag. Failure to do so will result in a failure to extract the archive.
```shell
dokku git:from-archive --archive-type zip node-js-app https://github.com/dokku/smoke-test-app/archive/2.0.0.zip "Camila" "camila@example.com"
```
Finally, if the archive url is specified as `--`, the archive will be fetched from stdin.
```shell
curl -sSL https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar | dokku git:from-archive node-js-app --
```

View File

@@ -8,6 +8,7 @@ git:allow-host <host> # Adds a host to known_hosts
git:auth <host> [<username> <password>] # Configures netrc authentication for a given git server
git:from-archive [--archive-type ARCHIVE_TYPE] <app> <archive-url> [<git-username> <git-email>] # Updates an app's git repository with a given archive file
git:from-image [--build-dir DIRECTORY] <app> <docker-image> [<git-username> <git-email>] # Updates an app's git repository with a given docker image
git:generate-deploy-key # Generates a deploy ssh key
git:load-image [--build-dir DIRECTORY] <app> <docker-image> [<git-username> <git-email>] # Updates an app's git repository with a docker image loaded from stdin
git:sync [--build] <app> <repository> [<git-ref>] # Clone or fetch an app from remote git repo
git:initialize <app> # Initialize a git repository for an app
@@ -125,142 +126,6 @@ dokku git:set node-js-app keep-git-dir ""
Please keep in mind that setting `keep-git-dir` to `true` may result in unstaged changes shown within the built container due to the build process generating application changes within the built app directory.
### Initializing an app repository from a docker image
> [!IMPORTANT]
> New as of 0.24.0
A Dokku app repository can be initialized or updated from a Docker image via the `git:from-image` command. This command will either initialize the app repository or update it to include the specified Docker image via a `FROM` stanza. This is an excellent way of tracking changes when deploying only a given docker image, especially if deploying an image from a remote CI/CD pipeline.
```shell
dokku git:from-image node-js-app dokku/node-js-getting-started:latest
```
In the above example, Dokku will build the app as if the repository contained _only_ a `Dockerfile` with the following content:
```Dockerfile
FROM dokku/node-js-getting-started:latest
```
If the specified image already exists on the Dokku host, it will not be pulled again, though this behavior may be changed using [build phase docker-options](/docs/advanced-usage/docker-options.md).
Triggering a build with the same arguments multiple times will result in Dokku exiting `0` early as there will be no changes detected. If the image tag is reused but the underlying image is different, it is recommended to use the image digest instead of the tag. This can be retrieved via the following command:
```shell
# for images pushed to a remote registry
docker inspect --format='{{index .RepoDigests 0}}' $IMAGE_NAME
# for images built locally and not pushed to a registry
# use when the previous command output is empty
docker images --no-trunc --quiet $IMAGE_NAME
```
The resulting `git:from-image` call would then be:
```shell
# where the image sha is: sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
dokku git:from-image node-js-app dokku/node-js-getting-started@sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
```
The `git:from-image` command can optionally take a git `user.name` and `user.email` argument (in that order) to customize the author. If the arguments are left empty, they will fallback to `Dokku` and `automated@dokku.sh`, respectively.
```shell
dokku git:from-image node-js-app dokku/node-js-getting-started:latest "Camila" "camila@example.com"
```
If the image is a private image that requires a docker login to access, the `registry:login` command should be used to log into the registry. See the [registry documentation](/docs/advanced-usage/registry-management.md#logging-into-a-registry) for more details on this process.
Finally, certain images may require a custom build context in order for `ONBUILD ADD` and `ONBUILD COPY` statements to succeed. A custom build context can be specified via the `--build-dir` flag. All files in the specified `build-dir` will be copied into the repository for use within the `docker build` process. The build context _must_ be specified on each deploy, and is not otherwise persisted between builds.
```shell
dokku git:from-image --build-dir path/to/build node-js-app dokku/node-js-getting-started:latest "Camila" "camila@example.com"
```
See the [dockerfile documentation](/docs/deployment/builders/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.
### Initializing an app repository from an archive file
> [!IMPORTANT]
> New as of 0.24.0
A Dokku app repository can be initialized or updated from the contents of an archive file via the `git:from-archive` command. This is an excellent way of tracking changes when deploying pre-built binary archives, such as java jars or go binaries. This can also be useful when deploying directly from a GitHub repository at a specific commit.
```shell
dokku git:from-archive node-js-app https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar
```
In the above example, Dokku will build the app as if the repository contained the extracted contents of the specified archive file.
Triggering a build with the same archive file multiple times will result in Dokku exiting `0` early as there will be no changes detected.
The `git:from-archive` command can optionally take a git `user.name` and `user.email` argument (in that order) to customize the author. If the arguments are left empty, they will fallback to `Dokku` and `automated@dokku.sh`, respectively.
```shell
dokku git:from-archive node-js-app https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar "Camila" "camila@example.com"
```
The default archive type is always set to `.tar`. To use a different archive type, specify the `--archive-type` flag. Failure to do so will result in a failure to extract the archive.
```shell
dokku git:from-archive --archive-type zip node-js-app https://github.com/dokku/smoke-test-app/archive/2.0.0.zip "Camila" "camila@example.com"
```
Finally, if the archive url is specified as `--`, the archive will be fetched from stdin.
```shell
curl -sSL https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar | dokku git:from-archive node-js-app --
```
### Initializing an app repository from a remote image without a registry
> [!IMPORTANT]
> New as of 0.30.0
A Dokku app repository can be initialized or updated from the contents of an image archive tar file via the `git:load-image` command. This method can be used when a Docker Registry is unavailable to act as an intermediary for storing an image, such as when building an image in CI and deploying directly from that image.
```shell
docker image save dokku/node-js-getting-started:latest | ssh dokku@dokku.me git:load-image node-js-app dokku/node-js-getting-started:latest
```
In the above example, we are saving the image to a tar file via `docker image save`, streaming that to the Dokku host, and then running `git:load-image` on the incoming stream. Dokku will build the app as if the repository contained _only_ a `Dockerfile` with the following content:
```Dockerfile
FROM dokku/node-js-getting-started:latest
```
When deploying an app via `git:load-image`, it is highly recommended to use a unique image tag when building the image. Not doing so will result in Dokku exiting `0` early as there will be no changes detected. If the image tag is reused but the underlying image is different, it is recommended to use the image digest instead of the tag. This can be retrieved via the following command:
```shell
# for images pushed to a remote registry
docker inspect --format='{{index .RepoDigests 0}}' $IMAGE_NAME
# for images built locally and not pushed to a registry
# use when the previous command output is empty
docker images --no-trunc --quiet $IMAGE_NAME
```
The resulting `git:load-image` call would then be:
```shell
# where the image sha is: sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
docker image save dokku/node-js-getting-started:latest | ssh dokku@dokku.me git:load-image node-js-app dokku/node-js-getting-started@sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
```
The `git:load-image` command can optionally take a git `user.name` and `user.email` argument (in that order) to customize the author. If the arguments are left empty, they will fallback to `Dokku` and `automated@dokku.sh`, respectively.
```shell
docker image save dokku/node-js-getting-started:latest | ssh dokku@dokku.me git:load-image node-js-app dokku/node-js-getting-started:latest "Camila" "camila@example.com"
```
Finally, certain images may require a custom build context in order for `ONBUILD ADD` and `ONBUILD COPY` statements to succeed. A custom build context can be specified via the `--build-dir` flag. All files in the specified `build-dir` will be copied into the repository for use within the `docker build` process. The build context _must_ be specified on each deploy, and is not otherwise persisted between builds.
```shell
docker image save dokku/node-js-getting-started:latest | ssh dokku@dokku.me git:load-image --build-dir path/to/build node-js-app dokku/node-js-getting-started:latest "Camila" "camila@example.com"
```
See the [dockerfile documentation](/docs/deployment/builders/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.
### Initializing an app repository from a remote repository
> [!IMPORTANT]
@@ -325,9 +190,40 @@ dokku git:allow-host github.com
Note that this command is currently not idempotent and may add duplicate entries to the `~dokku/.ssh/known_hosts` file.
### Creating a cloning ssh key pair
> [!IMPORTANT]
> New as of 0.33.0
While most repositories can be authenticated to via the `git:auth` command, some users may prefer to use an ssh key. This can be generated via the `git:generate-deploy-key` command, which generates a passwordless ed25519 key-pair.
```shell
dokku git:generate-deploy-key
```
```
Generating public/private ed25519 key pair.
Your identification has been saved in /home/dokku/.ssh/id_ed25519
Your public key has been saved in /home/dokku/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256:PvlvVfbpYvkmA87rTfLUq07e3GarRN1BcLqDSjod+p8 dokku@ubuntu
The key's randomart image is:
+--[ED25519 256]--+
| ..o |
| + |
| . . |
| . o =|
| So . + ++|
| .=.o.. +..|
| ++oo..*o. |
| oo o%*oo=|
| .+E=BOOo|
+----[SHA256]-----+
```
### Verifying the cloning public key
In order to clone a remote repository, the remote server should have the Dokku host's public key configured. This plugin does not currently create this key, but if there is one available, it can be shown via the `git:public-key` command.
In order to clone a remote repository, the remote server should have the Dokku host's public key configured. This plugin does not currently create this key, but if can be shown via the `git:public-key` command.
```shell
dokku git:public-key

View File

@@ -0,0 +1,104 @@
# Docker Image Deployment
## Initializing an app repository from a docker image
> [!IMPORTANT]
> New as of 0.24.0
A Dokku app repository can be initialized or updated from a Docker image via the `git:from-image` command. This command will either initialize the app repository or update it to include the specified Docker image via a `FROM` stanza. This is an excellent way of tracking changes when deploying only a given docker image, especially if deploying an image from a remote CI/CD pipeline.
```shell
dokku git:from-image node-js-app my-registry/node-js-getting-started:latest
```
In the above example, Dokku will build the app as if the repository contained _only_ a `Dockerfile` with the following content:
```Dockerfile
FROM my-registry/node-js-getting-started:latest
```
If the specified image already exists on the Dokku host, it will not be pulled again, though this behavior may be changed using [build phase docker-options](/docs/advanced-usage/docker-options.md).
Triggering a build with the same arguments multiple times will result in Dokku exiting `0` early as there will be no changes detected. If the image tag is reused but the underlying image is different, it is recommended to use the image digest instead of the tag. This can be retrieved via the following command:
```shell
# for images pushed to a remote registry
docker inspect --format='{{index .RepoDigests 0}}' $IMAGE_NAME
# for images built locally and not pushed to a registry
# use when the previous command output is empty
docker images --no-trunc --quiet $IMAGE_NAME
```
The resulting `git:from-image` call would then be:
```shell
# where the image sha is: sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
dokku git:from-image node-js-app my-registry/node-js-getting-started@sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
```
The `git:from-image` command can optionally take a git `user.name` and `user.email` argument (in that order) to customize the author. If the arguments are left empty, they will fallback to `Dokku` and `automated@dokku.sh`, respectively.
```shell
dokku git:from-image node-js-app my-registry/node-js-getting-started:latest "Camila" "camila@example.com"
```
If the image is a private image that requires a docker login to access, the `registry:login` command should be used to log into the registry. See the [registry documentation](/docs/advanced-usage/registry-management.md#logging-into-a-registry) for more details on this process.
Finally, certain images may require a custom build context in order for `ONBUILD ADD` and `ONBUILD COPY` statements to succeed. A custom build context can be specified via the `--build-dir` flag. All files in the specified `build-dir` will be copied into the repository for use within the `docker build` process. The build context _must_ be specified on each deploy, and is not otherwise persisted between builds.
```shell
dokku git:from-image --build-dir path/to/build node-js-app domy-registrykku/node-js-getting-started:latest "Camila" "camila@example.com"
```
See the [dockerfile documentation](/docs/deployment/builders/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.
## Initializing an app repository from a remote image without a registry
> [!IMPORTANT]
> New as of 0.30.0
A Dokku app repository can be initialized or updated from the contents of an image archive tar file via the `git:load-image` command. This method can be used when a Docker Registry is unavailable to act as an intermediary for storing an image, such as when building an image in CI and deploying directly from that image.
```shell
docker image save my-registry/node-js-getting-started:latest | ssh dokku@dokku.me git:load-image node-js-app my-registry/node-js-getting-started:latest
```
In the above example, we are saving the image to a tar file via `docker image save`, streaming that to the Dokku host, and then running `git:load-image` on the incoming stream. Dokku will build the app as if the repository contained _only_ a `Dockerfile` with the following content:
```Dockerfile
FROM my-registry/node-js-getting-started:latest
```
When deploying an app via `git:load-image`, it is highly recommended to use a unique image tag when building the image. Not doing so will result in Dokku exiting `0` early as there will be no changes detected. If the image tag is reused but the underlying image is different, it is recommended to use the image digest instead of the tag. This can be retrieved via the following command:
```shell
# for images pushed to a remote registry
docker inspect --format='{{index .RepoDigests 0}}' $IMAGE_NAME
# for images built locally and not pushed to a registry
# use when the previous command output is empty
docker images --no-trunc --quiet $IMAGE_NAME
```
The resulting `git:load-image` call would then be:
```shell
# where the image sha is: sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
docker image save my-registry/node-js-getting-started:latest | ssh dokku@dokku.me git:load-image node-js-app my-registry/node-js-getting-started@sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
```
The `git:load-image` command can optionally take a git `user.name` and `user.email` argument (in that order) to customize the author. If the arguments are left empty, they will fallback to `Dokku` and `automated@dokku.sh`, respectively.
```shell
docker image save my-registry/node-js-getting-started:latest | ssh dokku@dokku.me git:load-image node-js-app my-registry/node-js-getting-started:latest "Camila" "camila@example.com"
```
Finally, certain images may require a custom build context in order for `ONBUILD ADD` and `ONBUILD COPY` statements to succeed. A custom build context can be specified via the `--build-dir` flag. All files in the specified `build-dir` will be copied into the repository for use within the `docker build` process. The build context _must_ be specified on each deploy, and is not otherwise persisted between builds.
```shell
docker image save my-registry/node-js-getting-started:latest | ssh dokku@dokku.me git:load-image --build-dir path/to/build node-js-app my-registry/node-js-getting-started:latest "Camila" "camila@example.com"
```
See the [dockerfile documentation](/docs/deployment/builders/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.

View File

@@ -20,11 +20,17 @@ dokku scheduler:set node-js-app selected docker-local
As it is the default, unsetting the `selected` scheduler property is also a valid way to reset the scheduler.
```shell
dokku scheduler:set node-js-app selected
dokku scheduler:set node-js-app selected
```
## Usage
### Deploying amd64 images on arm64
> New as of 0.33.0
Many builders only produce amd64-compatible images. The docker-local scheduler will automatically detect these and run them via the `--platform=linux/amd64` on arm64 deploy targets.
### Disabling chown of persistent storage
The `scheduler-docker-local` plugin will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`. You may disable this by running the following `scheduler-docker-local:set` command for your application:
@@ -101,7 +107,7 @@ The `formation` key should be specified as follows in the `app.json` file:
}
```
Omitting or removing the entry will result in parallelism for that process type to return to 1 entry at a time. This can be combined with the `parallel-schedule-count` property to speed up deployments.
Omitting or removing the entry will result in parallelism for that process type to return to 1 entry at a time. This can be combined with the `parallel-schedule-count` property to speed up deployments.
Note that increasing the value of `max_parallel` may significantly impact CPU utilization on your host as your app containers - and their respective processes - start up. Setting a value higher than the number of available CPUs is discouraged. It is recommended that users carefully set this value so as not to overburden their server.

View File

@@ -0,0 +1,333 @@
# K3s Scheduler
> [!IMPORTANT]
> New as of 0.33.0
```
scheduler-k3s:cluster-add [ssh://user@host:port] # Adds a server node to a Dokku-managed cluster
scheduler-k3s:cluster-list # Lists all nodes in a Dokku-managed cluster
scheduler-k3s:cluster-remove [node-id] # Removes client node to a Dokku-managed cluster
scheduler-k3s:initialize # Initializes a cluster
scheduler-k3s:report [<app>] [<flag>] # Displays a scheduler-k3s report for one or more apps
scheduler-k3s:set [<app>|--global] <key> (<value>) # Set or clear a scheduler-k3s property for an app or the scheduler
scheduler-k3s:show-kubeconfig # Displays the kubeconfig for remote usage
scheduler-k3s:uninstall # Uninstalls k3s from the Dokku server
```
> [!NOTE]
> The k3s plugin replaces the external [scheduler-kubernetes](https://github.com/dokku/dokku-scheduler-kubernetes) plugin. Users can continue to use the external plugin as necessary, but all future development will occur on the official core k3s plugin.
For multi-server support, Dokku provides the ability for users to setup a K3s cluster. As with all schedulers, it is set on a per-app basis. The scheduler can currently be overridden by running the following command:
```shell
dokku scheduler:set node-js-app selected k3s
```
As it is the default, unsetting the `selected` scheduler property is also a valid way to reset the scheduler.
```shell
dokku scheduler:set node-js-app k3s
```
## Usage
### Initializing a cluster
> [!WARNING]
> This command must be run as root
Clusters can be initialized via the `scheduler-k3s:initialize` command. This will start a k3s cluster on the Dokku node itself.
```shell
dokku scheduler-k3s:initialize
```
By default, the k3s installation can run both app and system workloads. For clusters where app workloads are run on distinct worker nodes, initialize the cluster with the `--taint-scheduling` flag, which will allow _only_ Critical cluster components on the k3s control-plane nodes.
```shell
dokku scheduler-k3s:initialize --taint-scheduling
```
By default, Dokku will attempt to auto-detect the IP address of the server. In cases where the auto-detected IP address is incorrect, an override may be specified via the `--server-ip` flag:
```shell
dokku scheduler-k3s:initialize --server-ip 192.168.20.15
```
### Adding nodes to the cluster
> [!WARNING]
> The `dokku` user _must_ be able to ssh onto the server in order to connect nodes to the cluster. The remote user must be root or have sudo enabled, or the install will fail.
#### Adding a worker node
Nodes that run app workloads can be added via the `scheduler-k3s:cluster-add` command. This will ssh onto the specified server, install k3s, and join it to the current Dokku node in worker mode. Workers are typically used to run app workloads.
```shell
dokku scheduler-k3s:cluster-add ssh://root@worker-1.example.com
```
If the server isn't in the `known_hosts` file, the connection will fail. This can be bypassed by setting the `--insecure-allow-unknown-hosts` flag:
```shell
dokku scheduler-k3s:cluster-add --insecure-allow-unknown-hosts ssh://root@worker-1.example.com
```
By default, Dokku will attempt to auto-detect the IP address of the Dokku server for the remote server to connect to. In cases where the auto-detected IP address is incorrect, an override may be specified via the `--server-ip` flag:
```shell
dokku scheduler-k3s:cluster-add --server-ip 192.168.20.15 ssh://root@worker-1.example.com
```
#### Adding a server node
> [!NOTE]
> Only the initial Dokku server will be properly configured for push deployment, and should be considered your git remote. Additional server nodes are for ensuring high-availability of the K3s etcd state. Ensure this server is properly backed up and restorable or deployments will not work.
Server nodes are typically used to replicate the cluster state, and it is recommended to have an odd number of nodes spread across several availability zones (datacenters in close proximity within a region). This allows for higher availability in the event of a cluster failure. Server nodes run control-plane services such as the traefik load balancer and the etcd backing store.
Server nodes can also be added with the `scheduler-k3s:cluster-add` command by specifying `--role server`. This will ssh onto the specified server, install k3s, and join it to the current Dokku node in server mode.
```shell
dokku scheduler-k3s:cluster-add --role server ssh://root@server-1.example.com
```
Server nodes allow any workloads to be scheduled on them by default, in addition to the control-plane, etcd, and the scheduler itself. To avoid app workloads being scheduled on your control-plane, use the `--taint-scheduling` flag:
```shell
dokku scheduler-k3s:cluster-add --role server --taint-scheduling ssh://root@server-1.example.com
```
If the server isn't in the `known_hosts` file, the connection will fail. This can be bypassed by setting the `--insecure-allow-unknown-hosts` flag:
```shell
dokku scheduler-k3s:cluster-add --role server --insecure-allow-unknown-hosts ssh://root@server-1.example.com
```
By default, Dokku will attempt to auto-detect the IP address of the Dokku server for the remote server to connect to. In cases where the auto-detected IP address is incorrect, an override may be specified via the `--server-ip` flag:
```shell
dokku scheduler-k3s:cluster-add --role server --server-ip 192.168.20.15 ssh://root@server-1.example.com
```
#### Changing the network interface
When attaching an worker or server node, the K3s plugin will look at the IP associated with the `eth0` interface and use that to connect the new node to the cluster. To change this, set the `network-interface` property to the appropriate value.
```shell
dokku scheduler-k3s:set --global network-interface eth1
```
### Changing deploy timeouts
By default, app deploys will timeout after 300s. To customize this value, set the `deploy-timeout` property via `scheduler-k3s:set`:
```shell
dokku scheduler-k3s:set node-js-app deploy-timeout 60s
```
The default value may be set by passing an empty value for the option:
```shell
dokku scheduler-k3s:set node-js-app deploy-timeout
```
The `deploy-timeout` property can also be set globally. The global default is `300s`.
```shell
dokku scheduler-k3s:set --global deploy-timeout 60s
```
The default value may be set by passing an empty value for the option.
```shell
dokku scheduler-k3s:set --global deploy-timeout
```
### Customizing the namespace
By default, app deploys will run against the `default` Kubernetes namespace. To customize this value, set the `namespace` property via `scheduler-k3s:set`:
```shell
dokku scheduler-k3s:set node-js-app namespace lollipop
```
The default value may be set by passing an empty value for the option:
```shell
dokku scheduler-k3s:set node-js-app namespace
```
The `namespace` property can also be set globally. The global default is `default`.
```shell
dokku scheduler-k3s:set --global namespace 60s
```
The default value may be set by passing an empty value for the option.
```shell
dokku scheduler-k3s:set --global namespace
```
### Enabling rollback on failure
By default, app deploys do not rollback on failure. To enable this functionality, set the `rollback-on-failure` property via `scheduler-k3s:set`:
```shell
dokku scheduler-k3s:set node-js-app rollback-on-failure true
```
The default value may be set by passing an empty value for the option:
```shell
dokku scheduler-k3s:set node-js-app rollback-on-failure
```
The `rollback-on-failure` property can also be set globally. The global default is `false`.
```shell
dokku scheduler-k3s:set --global rollback-on-failure false
```
The default value may be set by passing an empty value for the option.
```shell
dokku scheduler-k3s:set --global rollback-on-failure
```
### Using image pull secrets
When authenticating against a registry via `registry:login`, the scheduler-k3s plugin will authenticate all servers in the cluster against the registry specified. If desired, an image pull secret can be used instead. To customize this value, set the `image-pull-secrets` property via `scheduler-k3s:set`:
```shell
dokku scheduler-k3s:set node-js-app image-pull-secrets lollipop
```
The default value may be set by passing an empty value for the option:
```shell
dokku scheduler-k3s:set node-js-app image-pull-secrets
```
The `image-pull-secrets` property can also be set globally. The global default is empty string, and k3s will use the local `registries.yaml` for any private registry pulls.
```shell
dokku scheduler-k3s:set --global image-pull-secrets 60s
```
The default value may be set by passing an empty value for the option.
```shell
dokku scheduler-k3s:set --global image-pull-secrets
```
### Enabling letsencrypt integration
By default, letsencrypt is disabled and https port mappings are ignored. To enable, set the `letsencrypt-email-prod` or `letsencrypt-email-stag` property with the `--global` flag:
```shell
# set the value for prod
dokku scheduler-k3s:set --global letsencrypt-email-prod automated@dokku.sh
# set the value for stag
dokku scheduler-k3s:set --global letsencrypt-email-stag automated@dokku.sh
```
After enabling and rebuilding, all apps with an `https` port mapping that utilize the related letsencrypt server will be automatically updated to enable ssl. All http requests will then be redirected to https.
### Customizing the letsencrypt server
The letsencrypt integration is set to the production letsencrypt server by default. This can be changed on an app-level by setting the `letsencrypt-server` property with the `scheduler-k3s:set` command
```shell
dokku scheduler-k3s:set node-js-app letsencrypt-server staging
```
The default value may be set by passing an empty value for the option:
```shell
dokku scheduler-k3s:set node-js-app letsencrypt-server
```
The `image-pull-secrets` property can also be set globally. The global default is `production`.
```shell
dokku scheduler-k3s:set --global letsencrypt-server staging
```
The default value may be set by passing an empty value for the option.
```shell
dokku scheduler-k3s:set --global letsencrypt-server staging
```
### Using kubectl remotely
> [!WARNING]
> Certain ports must be open for interacting with the remote kubernets api. Refer to the [K3s networking documentation](https://docs.k3s.io/installation/requirements?os=debian#networking) for the required open ports between servers prior to running the command.
By default, Dokku assumes that all it controls all actions on the cluster, and thus does not expose the `kubectl` binary for administrators. To interact with kubectl, you will need to retrieve the `kubeconfig` for the cluster and configure your client to use that configuration.
```shell
dokku scheduler-k3s:show-kubeconfig
```
## Scheduler Interface
The following sections describe implemented and unimplemented scheduler functionality for the `k3s` scheduler.
### Implemented Commands and Triggers
This plugin implements various functionality through `plugn` triggers to integrate with Docker for running apps on a single server. The following functionality is supported by the `scheduler-k3s` plugin.
- `apps:clone`
- `apps:destroy`
- `apps:rename`
- `cron`
- `enter`
- `deploy`
- healthchecks
- Due to Kubernetes limitations, only a single healthcheck is supported for each of the `liveness`, `readiness`, and `startup` healthchecks
- Due to Kubernetes limitations, content checks are not supported
- Ports specified in the `app.json` are ignored in favor of the container port on the port mapping detected
- `logs`
- `ps:stop`
- `run`
- The `scheduler-post-run` trigger is not always triggered
- `run:detached`
- `run:list`
### Unimplemented command functionality
- `run:logs`
- `ps:inspect`
The following Dokku functionality is not implemented at this time.
- `vector` log integration
- persistent storage
### Logging support
App logs for the `logs` command are fetched by Dokku from running containers via the `kubectl` cli. Persisting logs via Vector is not implemented at this time. Users may choose to configure the Vector Kubernetes integration directly by following [this guide](https://vector.dev/docs/setup/installation/platforms/kubernetes/).
### Supported Resource Management Properties
The `k3s` scheduler supports a minimal list of resource _limits_ and _reservations_. The following properties are supported:
#### Resource Limits
> [!NOTE]
> Cron tasks retrieve resource limits based on the computed cron task ID. If unspecified, the default will be 1 CPU and 512m RAM.
- cpu: is specified in number of CPUs a process can access.
- memory: should be specified with a suffix of `b` (bytes), `k` (kilobytes), `m` (megabytes), `g` (gigabytes). Default unit is `m` (megabytes).
#### Resource Reservations
> [!NOTE]
> Cron tasks retrieve resource reservations based on the computed cron task ID. If unspecified, the default will be 1 CPU and 512m RAM.
- cpu: is specified in number of CPUs a process can access.
- memory: should be specified with a suffix of `b` (bytes), `k` (kilobytes), `m` (megabytes), `g` (gigabytes). Default unit is `m` (megabytes).

View File

@@ -1,7 +1,7 @@
# Kubernetes Scheduler
> [!WARNING]
> This scheduler is not in Dokku core and thus functionality may change over time as the API stabilizes.
> Deprecation notice: This scheduler has been replaced with the [k3s scheduler plugin](/docs/deployment/schedulers/k3s.md) and is no longer under active development.
The [Kubernetes Scheduler Plugin](https://github.com/dokku/dokku-scheduler-kubernetes) is available free as an external plugin. Please see the plugin's [issue tracker](https://github.com/dokku/dokku-scheduler-kubernetes/issues) for more information on the status of the plugin.

View File

@@ -97,6 +97,8 @@ At this time, the following dokku commands are used to implement a complete sche
- triggers: post-app-rename-setup
- `apps:clone`: handles app cloning
- triggers: post-app-clone-setup
- `cron`: generates cron tasks for the app
- triggers: cron-write
- `deploy`: deploys app proceses and checks the status of a deploy
- triggers: scheduler-app-status, scheduler-deploy, scheduler-is-deployed, scheduler-logs-failed
- `enter`: enters a running container
@@ -105,6 +107,10 @@ At this time, the following dokku commands are used to implement a complete sche
- triggers: scheduler-logs
- `run`: starts one-off run containers (detached and non-detached) as well as listing run processes
- triggers: scheduler-run, scheduler-run-list
- `run:list`: lists running containers
- triggers: scheduler-run-list
- `run:logs`: fetches running container logs
- triggers: scheduler-run-logs
- `ps:stop`: stops app processes
- triggers: scheduler-stop
- `ps:inspect`: outputs inspect output for processes in an app

View File

@@ -164,7 +164,7 @@ One or more healthchecks can be defined in the `app.json` file - see the [deploy
A healthcheck entry takes the following properties:
- `attempts`: (default: `3` seconds) Number of retry attempts to perform on failure.
- `attempts`: (default: `3`) Number of retry attempts to perform on failure.
- `command`: (default `''` - empty string) Command to execute within container.
- `content`: (default: `''` - empty string) Content to search in http path check output.
- `initialDelay`: (default: 0, unit: seconds) Number of seconds to wait after a container has started before triggering the healthcheck.

View File

@@ -1371,7 +1371,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
- Description: Returns a list of port mappings, newline delimited
- Invoked by: Various networking plugins
- Arguments: `$APP`
- Arguments: `$APP $FORMAT`
- Example:
```shell
@@ -1757,6 +1757,20 @@ APP="$1"
haproxy-build-config "$APP"
```
### `post-registry-login`
- Description: Allows running a command after the a registry has been logged into
- Invoked by: `dokku registry:login`
- Arguments: `$DOCKER_REGISTRY_SERVER $DOCKER_REGISTRY_USER`
- Example:
```shell
#!/usr/bin/env bash
# the DOCKER_REGISTRY_PASS env var is also set
echo "$DOCKER_REGISTRY_PASS"
```
### `post-release-builder`
> [!WARNING]

View File

@@ -29,7 +29,7 @@ The workflow looks like this:
```shell
# having dokku-arch in ../dokku-arch
vagrant up build-arch
# wait for "==> build-arch: ==> Finished making: dokku 0.32.3-2 (Mon Feb 22 23:20:37 CET 2016)"
# wait for "==> build-arch: ==> Finished making: dokku 0.33.2-2 (Mon Feb 22 23:20:37 CET 2016)"
cd ../dokku-arch
git add PKGBUILD .SRCINFO
git commit -m 'Update to dokku 0.9.9'

View File

@@ -3,7 +3,7 @@
Pull the dokku/dokku image:
```shell
docker pull dokku/dokku:0.32.3
docker pull dokku/dokku:0.33.2
```
Next, run the image.
@@ -19,7 +19,7 @@ docker container run \
--publish 8443:443 \
--volume /var/lib/dokku:/mnt/dokku \
--volume /var/run/docker.sock:/var/run/docker.sock \
dokku/dokku:0.32.3
dokku/dokku:0.33.2
```
The above command will start a new docker container that is ready when a message similar to `Runit started as PID 12345` appears.
@@ -61,7 +61,7 @@ redis: https://github.com/dokku/dokku-redis.git
The alternative is to build a custom docker image via a custom Dockerfile. This Dockerfile can run any `plugin:install` command. Note that the version installed at that time will be the one that persists. Below is an example Dockerfile showing this method.
```Dockerfile
FROM dokku/dokku:0.32.3
FROM dokku/dokku:0.33.2
RUN dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
RUN dokku plugin:install https://github.com/dokku/dokku-redis.git redis
```

View File

@@ -37,8 +37,8 @@ To install the latest stable version of Dokku, you can run the following shell c
```shell
# for debian systems, installs Dokku via apt-get
wget -NP . https://dokku.com/install/v0.32.3/bootstrap.sh
sudo DOKKU_TAG=v0.32.3 bash bootstrap.sh
wget -NP . https://dokku.com/install/v0.33.2/bootstrap.sh
sudo DOKKU_TAG=v0.33.2 bash bootstrap.sh
```
The installation process takes about 5-10 minutes, depending upon internet connection speed.

View File

@@ -10,26 +10,26 @@
<meta name="author" content="">
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Dokku">
<meta name="application-name" content="Dokku">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
@@ -38,7 +38,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/style.css" rel="stylesheet">
<!-- <link href="./assets/style.css" rel="stylesheet"> -->
</head>
@@ -98,7 +98,7 @@
<main class="container px-4 px-lg-5">
<div class="row">
<div class="col-lg-7">
<a class="badge-link" href="https://github.com/dokku/dokku/releases"><span class="badge py-2 d-flex fit-content"><div class="circle align-self-center me-2"></div>Latest release <span id="releaseVersion" class="ms-1">v0.32.3</span></span></a>
<a class="badge-link" href="https://github.com/dokku/dokku/releases"><span class="badge py-2 d-flex fit-content"><div class="circle align-self-center me-2"></div>Latest release <span id="releaseVersion" class="ms-1">v0.33.2</span></span></a>
<h1 class="text-white hero-heading mt-5">An open source PAAS alternative to Heroku.</h1>
<h4 class="text-white mt-5">Dokku helps you build and manage the lifecycle of applications from building to scaling.</h4>
<div class="d-flex mt-5">
@@ -125,7 +125,7 @@
</p>
<p class="line">
<span class="prompt">$</span>
<span class="command">sudo DOKKU_TAG=v0.32.3 bash bootstrap.sh</span>
<span class="command">sudo DOKKU_TAG=v0.33.2 bash bootstrap.sh</span>
</p>
<br>
@@ -226,8 +226,8 @@
</svg>
Create</a>
<a class="nav-link" id="nav-deploy-tab" data-bs-toggle="tab" href="#nav-deploy" role="tab" aria-controls="nav-deploy" aria-selected="false">
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M29.8709 1.40551C29.8591 1.34642 29.8311 1.29205 29.7903 1.24881C29.7495 1.20556 29.6976 1.17524 29.6407 1.16141C25.8466 0.20375 17.082 3.61605 12.3285 8.51812C11.4813 9.38524 10.7088 10.3268 10.0198 11.3321C8.55457 11.1953 7.08939 11.3105 5.84189 11.8721C2.31916 13.4706 1.29423 17.6454 1.00817 19.4376C0.992669 19.5358 0.999288 19.6364 1.02751 19.7315C1.05574 19.8267 1.10481 19.9138 1.17093 19.9862C1.23705 20.0586 1.31844 20.1144 1.40878 20.1491C1.49913 20.1838 1.59601 20.1966 1.69192 20.1865L7.34824 19.5456C7.35215 19.9859 7.37777 20.4257 7.42498 20.8633C7.4545 21.1658 7.58527 21.4482 7.79477 21.6618L9.98487 23.9221C10.1921 24.1384 10.466 24.2734 10.7593 24.3037C11.1808 24.3522 11.6044 24.3786 12.0285 24.3829L11.4082 30.2153C11.3985 30.32.3 11.411 30.414 11.4446 30.507C11.4783 30.6001 11.5323 30.684 11.6023 30.7521C11.6724 30.8202 11.7567 30.8708 11.8487 30.9C11.9408 30.9291 12.0381 30.936 12.1331 30.9202C13.8704 30.6322 17.9241 29.5744 19.4639 25.9396C20.0081 24.6508 20.1198 23.1466 19.9942 21.6417C20.9712 20.9312 21.8861 20.134 22.7285 19.2591C27.4994 14.3627 30.7849 5.51625 29.8709 1.40551ZM18.4878 12.9162C18.0711 12.4862 17.7873 11.9384 17.6723 11.3419C17.5573 10.7455 17.6162 10.1273 17.8417 9.56541C18.0672 9.00356 18.449 8.52333 18.939 8.18546C19.4289 7.84759 20.005 7.66725 20.5942 7.66725C21.1835 7.66725 21.7595 7.84759 22.2494 8.18546C22.7394 8.52333 23.1212 9.00356 23.3467 9.56541C23.5722 10.1273 23.6311 10.7455 23.5161 11.3419C23.4011 11.9384 23.1173 12.4862 22.7006 12.9162C22.4242 13.202 22.0959 13.4288 21.7344 13.5835C21.373 13.7383 20.9855 13.8179 20.5942 13.8179C20.2029 13.8179 19.8154 13.7383 19.454 13.5835C19.0926 13.4288 18.7642 13.202 18.4878 12.9162Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
<svg width="32" height="32" viewBox="0 0.33.22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M29.8709 1.40551C29.8591 1.34642 29.8311 1.29205 29.7903 1.24881C29.7495 1.20556 29.6976 1.17524 29.6407 1.16141C25.8466 0.20375 17.082 3.61605 12.3285 8.51812C11.4813 9.38524 10.7088 10.3268 10.0198 11.3321C8.55457 11.1953 7.08939 11.3105 5.84189 11.8721C2.31916 13.4706 1.29423 17.6454 1.00817 19.4376C0.992669 19.5358 0.999288 19.6364 1.02751 19.7315C1.05574 19.8267 1.10481 19.9138 1.17093 19.9862C1.23705 20.0586 1.31844 20.1144 1.40878 20.1491C1.49913 20.1838 1.59601 20.1966 1.69192 20.1865L7.34824 19.5456C7.35215 19.9859 7.37777 20.4257 7.42498 20.8633C7.4545 21.1658 7.58527 21.4482 7.79477 21.6618L9.98487 23.9221C10.1921 24.1384 10.466 24.2734 10.7593 24.3037C11.1808 24.3522 11.6044 24.3786 12.0285 24.3829L11.4082 30.2153C11.3985 30.33.2 11.411 30.414 11.4446 30.507C11.4783 30.6001 11.5323 30.684 11.6023 30.7521C11.6724 30.8202 11.7567 30.8708 11.8487 30.9C11.9408 30.9291 12.0381 30.936 12.1331 30.9202C13.8704 30.6322 17.9241 29.5744 19.4639 25.9396C20.0081 24.6508 20.1198 23.1466 19.9942 21.6417C20.9712 20.9312 21.8861 20.134 22.7285 19.2591C27.4994 14.3627 30.7849 5.51625 29.8709 1.40551ZM18.4878 12.9162C18.0711 12.4862 17.7873 11.9384 17.6723 11.3419C17.5573 10.7455 17.6162 10.1273 17.8417 9.56541C18.0672 9.00356 18.449 8.52333 18.939 8.18546C19.4289 7.84759 20.005 7.66725 20.5942 7.66725C21.1835 7.66725 21.7595 7.84759 22.2494 8.18546C22.7394 8.52333 23.1212 9.00356 23.3467 9.56541C23.5722 10.1273 23.6311 10.7455 23.5161 11.3419C23.4011 11.9384 23.1173 12.4862 22.7006 12.9162C22.4242 13.202 22.0959 13.4288 21.7344 13.5835C21.373 13.7383 20.9855 13.8179 20.5942 13.8179C20.2029 13.8179 19.8154 13.7383 19.454 13.5835C19.0926 13.4288 18.7642 13.202 18.4878 12.9162Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
<path d="M5.29982 22.8765C4.60428 22.9646 3.95721 23.29 3.46136 23.801C2.232 25.074 2.11548 29.7889 2.11548 29.7889C2.11548 29.7889 6.68686 29.6687 7.91692 28.3985C8.41409 27.8876 8.72993 27.2187 8.81347 26.4997" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
</svg>
Deploy</a>

View File

@@ -9,13 +9,39 @@ proxy:clear-config [--all|<app>] # Clears config for given app
proxy:disable [--parallel count] [--all|<app>] # Disable proxy for app
proxy:enable [--parallel count] [--all|<app>] # Enable proxy for app
proxy:report [<app>] [<flag>] # Displays a proxy report for one or more apps
proxy:set <app> <proxy-type> # Set proxy type for app
proxy:set [<app>|--global] <proxy-type> # Set proxy type for app
```
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
## Usage
### Changing the proxy
The default proxy shipped with Dokku is `nginx`. It can be changed via the `proxy:set` command.
```shell
dokku proxy:set node-js-app caddy
```
```
-----> Setting config vars
DOKKU_APP_PROXY_TYPE: caddy
```
The proxy may also be set on a global basis. This is usually preferred as running multiple proxy implementations may cause port collision issues.
```shell
dokku proxy:set --global caddy
```
```
-----> Setting config vars
DOKKU_PROXY_TYPE: caddy
```
Changing the proxy does not stop or start any given proxy implementation. Please see the documentation for your proxy implementation for details on how to perform a change.
### Regenerating proxy config
In certain cases, your app proxy configs may drift from the correct config for your app. You may regenerate the config at any point via the `proxy:build-config` command. This command will trigger a rebuild for the configured proxy implementation (default: nginx) for a given app. The command may fail if there are no current web listeners for your app.

View File

@@ -9,26 +9,26 @@
<meta name="author" content="">
<title>Dokku - {{DOC_TITLE}}</title>
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Dokku">
<meta name="application-name" content="Dokku">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script>
@@ -48,7 +48,7 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.32.3/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.2/docs/assets/style.css" rel="stylesheet">
<!-- <link href="./assets/style.css" rel="stylesheet"> -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
</head>
@@ -153,6 +153,8 @@
<a href="#" class="list-group-item disabled">Deployment Methods</a>
<a href="/{{NAME}}/deployment/methods/git/" class="list-group-item">Git Deployment</a>
<a href="/{{NAME}}/deployment/methods/image/" class="list-group-item">Docker Image Deployment</a>
<a href="/{{NAME}}/deployment/methods/archive/" class="list-group-item">Archive Deployment</a>
<a href="#" class="list-group-item disabled">Configuration</a>
@@ -198,7 +200,7 @@
<a href="/{{NAME}}/deployment/schedulers/scheduler-management/" class="list-group-item">Scheduler Management</a>
<a href="/{{NAME}}/deployment/schedulers/docker-local/" class="list-group-item">Docker Local</a>
<a href="/{{NAME}}/deployment/schedulers/kubernetes/" class="list-group-item">Kubernetes</a>
<a href="/{{NAME}}/deployment/schedulers/k3s/" class="list-group-item">Kubernetes</a>
<a href="/{{NAME}}/deployment/schedulers/nomad/" class="list-group-item">Nomad</a>
<a href="/{{NAME}}/deployment/schedulers/null/" class="list-group-item">Null Scheduler</a>

View File

@@ -16,10 +16,10 @@
"deployment/methods/cloud-native-buildpacks": "deployment/builders/cloud-native-buildpacks/",
"deployment/methods/dockerfiles": "deployment/builders/dockerfiles/",
"deployment/methods/herokuish-buildpacks": "deployment/builders/herokuish-buildpacks/",
"deployment/images": "deployment/methods/git/#initializing-an-app-repository-from-a-docker-image",
"deployment/tar": "deployment/methods/git/#initializing-an-app-repository-from-an-archive-file",
"deployment/methods/images": "deployment/methods/git/#initializing-an-app-repository-from-a-docker-image",
"deployment/methods/tar": "deployment/methods/git/#initializing-an-app-repository-from-an-archive-file",
"deployment/images": "deployment/methods/image/",
"deployment/tar": "deployment/methods/archive/",
"deployment/methods/images": "deployment/methods/image/",
"deployment/methods/tar": "deployment/methods/archive/",
"configuration-management": "configuration/environment-variables/",
"deployment/ssl-configuration": "configuration/ssl/",
"configuration/nginx": "networking/proxies/nginx/",

4
dokku
View File

@@ -89,14 +89,14 @@ fi
if [[ $(id -un) != "dokku" ]]; then
unset TMP TMPDIR TEMP TEMPDIR
if [[ ! $1 =~ plugin:* ]] && [[ $1 != "ssh-keys:add" ]] && [[ $1 != "ssh-keys:remove" ]]; then
if [[ ! $1 =~ plugin:* ]] && [[ $1 != "ssh-keys:add" ]] && [[ $1 != "ssh-keys:remove" ]] && [[ $1 != "scheduler-k3s:initialize" ]] && [[ $1 != "scheduler-k3s:uninstall" ]]; then
export SSH_USER=$(id -un)
sudo -u dokku -E -H "$0" "$@"
exit $?
fi
fi
if [[ $1 =~ ^plugin:.* && $1 != "plugin:help" && $1 != "plugin:list" ]] || [[ $1 == "ssh-keys:add" ]] || [[ $1 == "ssh-keys:remove" ]]; then
if [[ $1 =~ ^plugin:.* && $1 != "plugin:help" && $1 != "plugin:list" ]] || [[ $1 == "ssh-keys:add" ]] || [[ $1 == "ssh-keys:remove" ]] || [[ $1 == "scheduler-k3s:initialize" ]] || [[ $1 == "scheduler-k3s:uninstall" ]]; then
if [[ $(id -un) != "root" ]]; then
dokku_log_fail "This command must be run as root"
else

24
go.work Normal file
View File

@@ -0,0 +1,24 @@
go 1.21
use (
./plugins/app-json
./plugins/apps
./plugins/builder
./plugins/buildpacks
./plugins/common
./plugins/config
./plugins/cron
./plugins/docker-options
./plugins/logs
./plugins/network
./plugins/nginx-vhosts
./plugins/ports
./plugins/proxy
./plugins/ps
./plugins/registry
./plugins/repo
./plugins/resource
./plugins/scheduler
./plugins/scheduler-docker-local
./plugins/scheduler-k3s
)

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core standard plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core events logging plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -6,5 +6,6 @@
/subcommands/*
/triggers
/triggers/*
/app-json-get-content
/app-json-process-deploy-parallelism
/core-*

View File

@@ -1,16 +1,21 @@
package appjson
import (
"encoding/json"
"fmt"
"os"
"strings"
"github.com/dokku/dokku/plugins/common"
)
var (
// DefaultProperties is a map of all valid network properties with corresponding default property values
// DefaultProperties is a map of all valid app-json properties with corresponding default property values
DefaultProperties = map[string]string{
"appjson-path": "",
}
// GlobalProperties is a map of all valid global network properties
// GlobalProperties is a map of all valid global app-json properties
GlobalProperties = map[string]bool{
"appjson-path": true,
}
@@ -18,29 +23,132 @@ var (
// AppJSON is a struct that represents an app.json file as understood by Dokku
type AppJSON struct {
Cron []CronCommand `json:"cron"`
// Cron is a list of cron commands to execute
Cron []CronCommand `json:"cron"`
// Formation is a map of process types to scale
Formation map[string]Formation `json:"formation"`
Scripts struct {
// Healthchecks is a map of process types to healthchecks
Healthchecks map[string][]Healthcheck `json:"healthchecks"`
// Scripts is a map of scripts to execute
Scripts struct {
// Dokku is a map of scripts to execute for Dokku-specific events
Dokku struct {
Predeploy string `json:"predeploy"`
// Predeploy is a script to execute before a deploy
Predeploy string `json:"predeploy"`
// Postdeploy is a script to execute after a deploy
Postdeploy string `json:"postdeploy"`
} `json:"dokku"`
// Postdeploy is a script to execute after a deploy
Postdeploy string `json:"postdeploy"`
} `json:"scripts"`
}
// CronCommand is a struct that represents a single cron command from an app.json file
type CronCommand struct {
Command string `json:"command"`
// Command is the command to execute
Command string `json:"command"`
// Schedule is the cron schedule to execute the command on
Schedule string `json:"schedule"`
}
// Formation is a struct that represents the scale for a process from an app.json file
type Formation struct {
Quantity *int `json:"quantity"`
// Quantity is the number of processes to run
Quantity *int `json:"quantity"`
// MaxParallel is the maximum number of processes to start in parallel
MaxParallel *int `json:"max_parallel"`
}
// Healthcheck is a struct that represents a single healthcheck from an app.json file
type Healthcheck struct {
// Attempts is the number of attempts to make before considering a healthcheck failed
Attempts int32 `json:"attempts,omitempty"`
// Command is the command to execute for the healthcheck
Command []string `json:"command,omitempty"`
// Content is the content to check for in the healthcheck response
Content string `json:"content,omitempty"`
// HTTPHeaders is a list of HTTP headers to send with the healthcheck request
HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty"`
// InitialDelay is the number of seconds to wait before starting healthchecks
InitialDelay int32 `json:"initialDelay,omitempty"`
// Listening is whether or not this is a listening check
Listening bool `json:"listening,omitempty"`
// Name is the name of the healthcheck
Name string `json:"name,omitempty"`
// Path is the path to check for in the healthcheck response
Path string `json:"path,omitempty"`
// Port is the port to check for in the healthcheck response
Port int `json:"port,omitempty"`
// Scheme is the scheme to use for the healthcheck request
Scheme string `json:"scheme,omitempty"`
// Timeout is the number of seconds to wait before considering a healthcheck failed
Timeout int32 `json:"timeout,omitempty"`
// Type is the type of healthcheck
Type HealthcheckType `json:"type,omitempty"`
// Uptime is the number of seconds to wait before considering a container running
Uptime int32 `json:"uptime,omitempty"`
// Wait is the number of seconds to wait between healthchecks
Wait int32 `json:"wait,omitempty"`
// Warn is whether or not to warn on a failed healthcheck instead of error out
Warn bool `json:"warn,omitempty"`
// OnFailure is the action to take on a failed healthcheck
OnFailure *OnFailure `json:"onFailure,omitempty"`
}
// HealthcheckType is a string that represents the type of a healthcheck from an app.json file
type HealthcheckType string
const (
// HealthcheckType_Liveness is a healthcheck type that represents a liveness check
HealthcheckType_Liveness HealthcheckType = "liveness"
// HealthcheckType_Readiness is a healthcheck type that represents a readiness check
HealthcheckType_Readiness HealthcheckType = "readiness"
// HealthcheckType_Startup is a healthcheck type that represents a startup check
HealthcheckType_Startup HealthcheckType = "startup"
)
// HTTPHeader is a struct that represents a single HTTP header associated with a healthcheck
type HTTPHeader struct {
// Name is the name of the HTTP header
Name string `json:"name,omitempty"`
// Value is the value of the HTTP header
Value string `json:"value,omitempty"`
}
// OnFailure is a struct that represents the on failure action for a healthcheck
type OnFailure struct {
// Command is the command to execute on failure
Command []string `json:"command,omitempty"`
// Url is the URL to call on failure
Url string `json:"url,omitempty"`
}
// GetAppjsonDirectory returns the directory containing a given app's extracted app.json file
func GetAppjsonDirectory(appName string) string {
return common.GetAppDataDirectory("app-json", appName)
@@ -50,3 +158,26 @@ func GetAppjsonDirectory(appName string) string {
func GetAppjsonPath(appName string) string {
return getProcessSpecificAppJSONPath(appName)
}
// GetAppJSON returns the parsed app.json file for a given app
func GetAppJSON(appName string) (AppJSON, error) {
if !hasAppJSON(appName) {
return AppJSON{}, nil
}
b, err := os.ReadFile(getProcessSpecificAppJSONPath(appName))
if err != nil {
return AppJSON{}, fmt.Errorf("Cannot read app.json file: %v", err)
}
if strings.TrimSpace(string(b)) == "" {
return AppJSON{}, nil
}
var appJSON AppJSON
if err = json.Unmarshal(b, &appJSON); err != nil {
return AppJSON{}, fmt.Errorf("Cannot parse app.json: %v", err)
}
return appJSON, nil
}

View File

@@ -6,7 +6,6 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
@@ -80,28 +79,6 @@ func constructScript(command string, shell string, isHerokuishImage bool, isCnbI
return []string{shell, "-c", strings.Join(script, " ")}
}
func getAppJSON(appName string) (AppJSON, error) {
if !hasAppJSON(appName) {
return AppJSON{}, nil
}
b, err := ioutil.ReadFile(getProcessSpecificAppJSONPath(appName))
if err != nil {
return AppJSON{}, fmt.Errorf("Cannot read app.json file: %v", err)
}
if strings.TrimSpace(string(b)) == "" {
return AppJSON{}, nil
}
var appJSON AppJSON
if err = json.Unmarshal(b, &appJSON); err != nil {
return AppJSON{}, fmt.Errorf("Cannot parse app.json: %v", err)
}
return appJSON, nil
}
func getAppJSONPath(appName string) string {
directory := filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "app-json", appName)
return filepath.Join(directory, "app.json")
@@ -119,7 +96,7 @@ func getProcessSpecificAppJSONPath(appName string) string {
// getPhaseScript extracts app.json from app image and returns the appropriate json key/value
func getPhaseScript(appName string, phase string) (string, error) {
appJSON, err := getAppJSON(appName)
appJSON, err := GetAppJSON(appName)
if err != nil {
return "", err
}
@@ -483,7 +460,7 @@ func createdContainerID(appName string, dockerArgs []string, image string, comma
}
func setScale(appName string, image string) error {
appJSON, err := getAppJSON(appName)
appJSON, err := GetAppJSON(appName)
if err != nil {
return err
}

View File

@@ -5,16 +5,27 @@ go 1.21
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/otiai10/copy v1.14.0
github.com/spf13/pflag v1.0.5
golang.org/x/sync v0.5.0
golang.org/x/sync v0.6.0
)
require (
github.com/alexellis/go-execute/v2 v2.2.1 // indirect
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/melbahja/goph v1.4.0 // indirect
github.com/otiai10/copy v1.14.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/sftp v1.13.5 // indirect
github.com/ryanuber/columnize v2.1.2+incompatible // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/sys v0.16.0 // indirect
)
replace github.com/dokku/dokku/plugins/common => ../common

View File

@@ -1,28 +1,97 @@
github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI=
github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/melbahja/goph v1.4.0 h1:z0PgDbBFe66lRYl3v5dGb9aFgPy0kotuQ37QOwSQFqs=
github.com/melbahja/goph v1.4.0/go.mod h1:uG+VfK2Dlhk+O32zFrRlc3kYKTlV6+BtvPWd/kK7U68=
github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo=
github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0=
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w=
github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks=
github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.5 h1:a3RLUqkyjYRtBTZJZ1VRrKbN3zhuPLlUc3sphVz81go=
github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/ryanuber/columnize v2.1.2+incompatible h1:C89EOx/XBWwIXl8wm8OPJBd7kPF25UfsK2X7Ph/zCAk=
github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core app-json plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -8,12 +8,11 @@ import (
"strings"
"github.com/dokku/dokku/plugins/common"
"github.com/otiai10/copy"
)
// TriggerAppJSONProcessDeployParallelism returns the max number of processes to deploy in parallel
func TriggerAppJSONProcessDeployParallelism(appName string, processType string) error {
appJSON, err := getAppJSON(appName)
appJSON, err := GetAppJSON(appName)
if err != nil {
return err
}
@@ -120,12 +119,12 @@ func TriggerCorePostExtract(appName string, sourceWorkDir string) error {
return common.TouchFile(fmt.Sprintf("%s.missing", processSpecificAppJSON))
}
if err := copy.Copy(repoAppJSONPath, processSpecificAppJSON); err != nil {
if err := common.Copy(repoAppJSONPath, processSpecificAppJSON); err != nil {
return fmt.Errorf("Unable to extract app.json: %v", err.Error())
}
if appJSONPath != "app.json" {
if err := copy.Copy(repoAppJSONPath, repoDefaultAppJSONPath); err != nil {
if err := common.Copy(repoAppJSONPath, repoDefaultAppJSONPath); err != nil {
return fmt.Errorf("Unable to move app.json into place: %v", err.Error())
}
}

View File

@@ -1,13 +1,13 @@
package apps
var (
// DefaultProperties is a map of all valid network properties with corresponding default property values
// DefaultProperties is a map of all valid apps properties with corresponding default property values
DefaultProperties = map[string]string{
"deploy-source": "",
"deploy-source-metadata": "",
}
// GlobalProperties is a map of all valid global network properties
// GlobalProperties is a map of all valid global apps properties
GlobalProperties = map[string]bool{
"deploy-source": true,
"deploy-source-metadata": true,

View File

@@ -8,12 +8,23 @@ require (
)
require (
github.com/alexellis/go-execute/v2 v2.2.1 // indirect
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/melbahja/goph v1.4.0 // indirect
github.com/otiai10/copy v1.14.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/sftp v1.13.5 // indirect
github.com/ryanuber/columnize v2.1.2+incompatible // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
)
replace github.com/dokku/dokku/plugins/common => ../common

View File

@@ -1,26 +1,95 @@
github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI=
github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/melbahja/goph v1.4.0 h1:z0PgDbBFe66lRYl3v5dGb9aFgPy0kotuQ37QOwSQFqs=
github.com/melbahja/goph v1.4.0/go.mod h1:uG+VfK2Dlhk+O32zFrRlc3kYKTlV6+BtvPWd/kK7U68=
github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo=
github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0=
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w=
github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks=
github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.5 h1:a3RLUqkyjYRtBTZJZ1VRrKbN3zhuPLlUc3sphVz81go=
github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/ryanuber/columnize v2.1.2+incompatible h1:C89EOx/XBWwIXl8wm8OPJBd7kPF25UfsK2X7Ph/zCAk=
github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core apps plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-dockerfile plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-herokuish plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-lambda plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-nixpacks plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-null plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-pack plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -1,13 +1,13 @@
package builder
var (
// DefaultProperties is a map of all valid network properties with corresponding default property values
// DefaultProperties is a map of all valid builder properties with corresponding default property values
DefaultProperties = map[string]string{
"selected": "",
"build-dir": "",
}
// GlobalProperties is a map of all valid global network properties
// GlobalProperties is a map of all valid global builder properties
GlobalProperties = map[string]bool{
"selected": true,
"build-dir": true,

View File

@@ -3,7 +3,6 @@ package builder
import (
"bytes"
"errors"
"io/ioutil"
"os"
"path"
"strings"
@@ -35,7 +34,7 @@ func listImagesByImageRepo(imageRepo string) ([]string, error) {
}
func removeAllContents(basePath string) error {
dir, err := ioutil.ReadDir(basePath)
dir, err := os.ReadDir(basePath)
if err != nil {
return err
}

View File

@@ -4,16 +4,27 @@ go 1.21
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
github.com/otiai10/copy v1.14.0
github.com/spf13/pflag v1.0.5
)
require (
github.com/alexellis/go-execute/v2 v2.2.1 // indirect
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/melbahja/goph v1.4.0 // indirect
github.com/otiai10/copy v1.14.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/sftp v1.13.5 // indirect
github.com/ryanuber/columnize v2.1.2+incompatible // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
)
replace github.com/dokku/dokku/plugins/common => ../common

View File

@@ -1,26 +1,95 @@
github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI=
github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/melbahja/goph v1.4.0 h1:z0PgDbBFe66lRYl3v5dGb9aFgPy0kotuQ37QOwSQFqs=
github.com/melbahja/goph v1.4.0/go.mod h1:uG+VfK2Dlhk+O32zFrRlc3kYKTlV6+BtvPWd/kK7U68=
github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo=
github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0=
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w=
github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks=
github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.5 h1:a3RLUqkyjYRtBTZJZ1VRrKbN3zhuPLlUc3sphVz81go=
github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/ryanuber/columnize v2.1.2+incompatible h1:C89EOx/XBWwIXl8wm8OPJBd7kPF25UfsK2X7Ph/zCAk=
github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -3,13 +3,11 @@ package builder
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"github.com/dokku/dokku/plugins/common"
"github.com/otiai10/copy"
)
// TriggerBuilderDetect outputs a manually selected builder for the app
@@ -71,7 +69,7 @@ func TriggerCorePostExtract(appName string, sourceWorkDir string) error {
return fmt.Errorf("Specified build-dir not found in sourcecode working directory: %v", buildDir)
}
tmpWorkDir, err := ioutil.TempDir(os.TempDir(), fmt.Sprintf("dokku-%s-%s", common.MustGetEnv("DOKKU_PID"), "CorePostExtract"))
tmpWorkDir, err := os.MkdirTemp(os.TempDir(), fmt.Sprintf("dokku-%s-%s", common.MustGetEnv("DOKKU_PID"), "CorePostExtract"))
if err != nil {
return fmt.Errorf("Unable to create temporary working directory: %v", err.Error())
}
@@ -80,7 +78,7 @@ func TriggerCorePostExtract(appName string, sourceWorkDir string) error {
return fmt.Errorf("Unable to clear out temporary working directory for rewrite: %v", err.Error())
}
if err := copy.Copy(newSourceWorkDir, tmpWorkDir); err != nil {
if err := common.Copy(newSourceWorkDir, tmpWorkDir); err != nil {
return fmt.Errorf("Unable to move build-dir to temporary working directory: %v", err.Error())
}
@@ -88,7 +86,7 @@ func TriggerCorePostExtract(appName string, sourceWorkDir string) error {
return fmt.Errorf("Unable to clear out sourcecode working directory for rewrite: %v", err.Error())
}
if err := copy.Copy(tmpWorkDir, sourceWorkDir); err != nil {
if err := common.Copy(tmpWorkDir, sourceWorkDir); err != nil {
return fmt.Errorf("Unable to move build-dir to sourcecode working directory: %v", err.Error())
}

View File

@@ -3,6 +3,7 @@ package buildpacks
import (
"errors"
"fmt"
"os"
"path/filepath"
"regexp"
"strings"
@@ -34,7 +35,11 @@ func rewriteBuildpacksFile(sourceWorkDir string) error {
buildpacks[i] = buildpack
}
return common.WriteSliceToFile(buildpacksPath, buildpacks)
return common.WriteSliceToFile(common.WriteSliceToFileInput{
Filename: buildpacksPath,
Lines: buildpacks,
Mode: os.FileMode(0600),
})
}
func validBuildpackURL(buildpack string) (string, error) {

View File

@@ -8,12 +8,23 @@ require (
)
require (
github.com/alexellis/go-execute/v2 v2.2.1 // indirect
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/melbahja/goph v1.4.0 // indirect
github.com/otiai10/copy v1.14.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/sftp v1.13.5 // indirect
github.com/ryanuber/columnize v2.1.2+incompatible // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
)
replace github.com/dokku/dokku/plugins/common => ../common

View File

@@ -1,26 +1,95 @@
github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI=
github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/melbahja/goph v1.4.0 h1:z0PgDbBFe66lRYl3v5dGb9aFgPy0kotuQ37QOwSQFqs=
github.com/melbahja/goph v1.4.0/go.mod h1:uG+VfK2Dlhk+O32zFrRlc3kYKTlV6+BtvPWd/kK7U68=
github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo=
github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0=
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w=
github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks=
github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.5 h1:a3RLUqkyjYRtBTZJZ1VRrKbN3zhuPLlUc3sphVz81go=
github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/ryanuber/columnize v2.1.2+incompatible h1:C89EOx/XBWwIXl8wm8OPJBd7kPF25UfsK2X7Ph/zCAk=
github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core buildpacks plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core caddy-vhosts plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core certificate management plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core checks plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

View File

@@ -1,3 +1,4 @@
GOARCH ?= amd64
TRIGGERS = triggers/app-list triggers/core-post-deploy triggers/install triggers/post-delete
BUILD = prop common triggers
PLUGIN_NAME = common
@@ -9,9 +10,9 @@ clean-common:
rm -rf common
prop: clean-prop **/**/prop.go
go build -ldflags="-s -w" $(GO_ARGS) -o prop src/prop/prop.go
GOARCH=$(GOARCH) go build -ldflags="-s -w" $(GO_ARGS) -o prop src/prop/prop.go
common: clean-common **/**/common.go
go build -ldflags="-s -w" $(GO_ARGS) -o common src/common/common.go
GOARCH=$(GOARCH) go build -ldflags="-s -w" $(GO_ARGS) -o common src/common/common.go
include ../../common.mk

View File

@@ -5,7 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"io"
"os"
"path/filepath"
"regexp"
@@ -280,7 +280,7 @@ func DokkuApps() ([]string, error) {
func UnfilteredDokkuApps() ([]string, error) {
apps := []string{}
dokkuRoot := MustGetEnv("DOKKU_ROOT")
files, err := ioutil.ReadDir(dokkuRoot)
files, err := os.ReadDir(dokkuRoot)
if err != nil {
return apps, fmt.Errorf("You haven't deployed any applications yet")
}
@@ -390,8 +390,8 @@ func ParseReportArgs(pluginName string, arguments []string) ([]string, string, e
}
// ParseScaleOutput allows golang plugins to properly parse the output of ps-current-scale
func ParseScaleOutput(b []byte) (map[string]int, error) {
scale := make(map[string]int)
func ParseScaleOutput(b []byte) (map[string]int32, error) {
scale := make(map[string]int32)
for _, line := range strings.Split(string(b), "\n") {
s := strings.SplitN(line, "=", 2)
@@ -399,11 +399,11 @@ func ParseScaleOutput(b []byte) (map[string]int, error) {
return scale, fmt.Errorf("invalid scale output stored by dokku: %v", line)
}
processType := s[0]
count, err := strconv.Atoi(s[1])
count, err := strconv.ParseInt(s[1], 10, 32)
if err != nil {
return scale, err
}
scale[processType] = count
scale[processType] = int32(count)
}
return scale, nil
@@ -517,7 +517,7 @@ func SuppressOutput(f errfunc) error {
err := f()
w.Close()
out, _ := ioutil.ReadAll(r)
out, _ := io.ReadAll(r)
os.Stdout = rescueStdout
if err != nil {

View File

@@ -1,7 +1,6 @@
package common
import (
"io/ioutil"
"os"
"strings"
"testing"
@@ -31,7 +30,7 @@ func setupTests() (err error) {
func setupTestApp() (err error) {
Expect(os.MkdirAll(testAppDir, 0644)).To(Succeed())
b := []byte(testEnvLine + "\n")
if err = ioutil.WriteFile(testEnvFile, b, 0644); err != nil {
if err = os.WriteFile(testEnvFile, b, 0644); err != nil {
return
}
return
@@ -40,7 +39,7 @@ func setupTestApp() (err error) {
func setupTestApp2() (err error) {
Expect(os.MkdirAll(testAppDir2, 0644)).To(Succeed())
b := []byte(testEnvLine2 + "\n")
if err = ioutil.WriteFile(testEnvFile2, b, 0644); err != nil {
if err = os.WriteFile(testEnvFile2, b, 0644); err != nil {
return
}
return

View File

@@ -4,8 +4,6 @@ import (
"fmt"
"os"
"path/filepath"
"github.com/otiai10/copy"
)
// CreateAppDataDirectory creates a data directory for the given plugin/app combination with the correct permissions
@@ -68,7 +66,7 @@ func CloneAppData(pluginName string, oldAppName string, newAppName string) error
}
newDataDir := GetAppDataDirectory(pluginName, newAppName)
if err := copy.Copy(oldDataDir, newDataDir); err != nil {
if err := Copy(oldDataDir, newDataDir); err != nil {
return fmt.Errorf("Unable to clone app data to new location: %v", err.Error())
}

View File

@@ -4,7 +4,6 @@ import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"os"
"strings"
"time"
@@ -64,22 +63,14 @@ func CopyFromImage(appName string, image string, source string, destination stri
return fmt.Errorf("Invalid docker image for copying content")
}
workDir := ""
if !IsAbsPath(source) {
if IsImageCnbBased(image) {
workDir = "/workspace"
} else if IsImageHerokuishBased(image, appName) {
workDir = "/app"
} else {
workDir, _ = DockerInspect(image, "{{.Config.WorkingDir}}")
}
workDir := GetWorkingDir(appName, image)
if workDir != "" {
source = fmt.Sprintf("%s/%s", workDir, source)
}
}
tmpFile, err := ioutil.TempFile(os.TempDir(), fmt.Sprintf("dokku-%s-%s", MustGetEnv("DOKKU_PID"), "CopyFromImage"))
tmpFile, err := os.CreateTemp(os.TempDir(), fmt.Sprintf("dokku-%s-%s", MustGetEnv("DOKKU_PID"), "CopyFromImage"))
if err != nil {
return fmt.Errorf("Cannot create temporary file: %v", err)
}
@@ -130,7 +121,7 @@ func CopyFromImage(appName string, image string, source string, destination stri
return fmt.Errorf("Unable to copy file %s from image", source)
}
// workaround for CHECKS file when owner is root. seems to only happen when running inside docker
// workaround when owner is root. seems to only happen when running inside docker
dos2unixCmd := NewShellCmd(strings.Join([]string{
"dos2unix",
"-l",
@@ -256,6 +247,18 @@ func DockerInspect(containerOrImageID, format string) (output string, err error)
return
}
// GetWorkingDir returns the working directory for a given image
func GetWorkingDir(appName string, image string) string {
if IsImageCnbBased(image) {
return "/workspace"
} else if IsImageHerokuishBased(image, appName) {
return "/app"
}
workDir, _ := DockerInspect(image, "{{.Config.WorkingDir}}")
return workDir
}
// IsImageCnbBased returns true if app image is based on cnb
func IsImageCnbBased(image string) bool {
if len(image) == 0 {

79
plugins/common/exec.go Normal file
View File

@@ -0,0 +1,79 @@
package common
import (
"errors"
"fmt"
"os"
"os/signal"
"syscall"
"context"
execute "github.com/alexellis/go-execute/v2"
"github.com/fatih/color"
)
type ExecCommandInput struct {
Command string
Args []string
CaptureOutput bool
Env map[string]string
StreamStdio bool
}
func CallExecCommand(input ExecCommandInput) (execute.ExecResult, error) {
signals := make(chan os.Signal, 1)
signal.Notify(signals, os.Interrupt, syscall.SIGHUP,
syscall.SIGINT,
syscall.SIGQUIT,
syscall.SIGTERM)
ctx, cancel := context.WithCancel(context.Background())
go func() {
<-signals
cancel()
}()
// hack: colors do not work natively with io.MultiWriter
// as it isn't detected as a tty. If the output isn't
// being captured, then color output can be forced.
isatty := !color.NoColor
env := os.Environ()
if isatty && !input.CaptureOutput {
env = append(env, "FORCE_TTY=1")
}
if input.Env != nil {
for k, v := range input.Env {
env = append(env, fmt.Sprintf("%s=%s", k, v))
}
}
cmd := execute.ExecTask{
Command: input.Command,
Args: input.Args,
Env: env,
DisableStdioBuffer: !input.CaptureOutput,
}
if os.Getenv("DOKKU_TRACE") == "1" {
cmd.PrintCommand = true
}
if isatty {
cmd.Stdin = os.Stdin
}
if input.StreamStdio {
cmd.StreamStdio = true
}
res, err := cmd.Execute(ctx)
if err != nil {
return res, err
}
if res.ExitCode != 0 {
return res, errors.New(res.Stderr)
}
return res, nil
}

View File

@@ -3,19 +3,30 @@ module github.com/dokku/dokku/plugins/common
go 1.21
require (
github.com/alexellis/go-execute/v2 v2.2.1
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27
github.com/onsi/gomega v1.30.0
github.com/fatih/color v1.16.0
github.com/hashicorp/go-multierror v1.1.1
github.com/melbahja/goph v1.4.0
github.com/onsi/gomega v1.31.1
github.com/otiai10/copy v1.14.0
github.com/ryanuber/columnize v2.1.2+incompatible
github.com/spf13/pflag v1.0.5
golang.org/x/sync v0.5.0
golang.org/x/crypto v0.18.0
golang.org/x/sync v0.6.0
)
require (
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/sftp v1.13.5 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

View File

@@ -1,38 +1,106 @@
github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI=
github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY=
github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4=
github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/melbahja/goph v1.4.0 h1:z0PgDbBFe66lRYl3v5dGb9aFgPy0kotuQ37QOwSQFqs=
github.com/melbahja/goph v1.4.0/go.mod h1:uG+VfK2Dlhk+O32zFrRlc3kYKTlV6+BtvPWd/kK7U68=
github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY=
github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM=
github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo=
github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0=
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w=
github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks=
github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.5 h1:a3RLUqkyjYRtBTZJZ1VRrKbN3zhuPLlUc3sphVz81go=
github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/ryanuber/columnize v2.1.2+incompatible h1:C89EOx/XBWwIXl8wm8OPJBd7kPF25UfsK2X7Ph/zCAk=
github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss=
golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA=
golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@@ -3,87 +3,63 @@ package common
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"os"
"os/user"
"strconv"
"strings"
"github.com/otiai10/copy"
)
// CatFile cats the contents of a file (if it exists)
func CatFile(filename string) {
slice, err := FileToSlice(filename)
f, err := os.Open(filename)
if err != nil {
LogDebug(fmt.Sprintf("Error cat'ing file %s: %s", filename, err.Error()))
return
}
defer f.Close()
for _, line := range slice {
LogDebug(fmt.Sprintf("line: '%s'", line))
scanner := bufio.NewScanner(f)
for scanner.Scan() {
LogDebug(fmt.Sprintf("line: '%s'", scanner.Text()))
}
}
// CopyFile copies a file from src to dst. If src and dst files exist, and are
// the same, then return success. Otherise, attempt to create a hard link
// between the two files. If that fail, copy the file contents from src to dst.
// FROM: https://stackoverflow.com/a/21067803/1515875
func CopyFile(src, dst string) (err error) {
sfi, err := os.Stat(src)
// Copy copies a file/directory from src to dst. If the source is a file, it will also
// convert line endings to unix style
func Copy(src, dst string) error {
fi, err := os.Stat(src)
if err != nil {
return
return err
}
if !sfi.Mode().IsRegular() {
// cannot copy non-regular files (e.g., directories,
// symlinks, devices, etc.)
return fmt.Errorf("CopyFile: non-regular source file %s (%q)", sfi.Name(), sfi.Mode().String())
}
dfi, err := os.Stat(dst)
if err != nil {
if !os.IsNotExist(err) {
return
}
} else {
if !(dfi.Mode().IsRegular()) {
return fmt.Errorf("CopyFile: non-regular destination file %s (%q)", dfi.Name(), dfi.Mode().String())
}
if os.SameFile(sfi, dfi) {
return
}
}
if err = os.Link(src, dst); err == nil {
return
}
err = copyFileContents(src, dst)
return
}
// copyFileContents copies the contents of the file named src to the file named
// by dst. The file will be created if it does not already exist. If the
// destination file exists, all it's contents will be replaced by the contents
// of the source file.
// FROM: https://stackoverflow.com/a/21067803/1515875
func copyFileContents(src, dst string) (err error) {
in, err := os.Open(src)
if !fi.Mode().IsRegular() {
return copy.Copy(src, dst)
}
// ensure file has the correct line endings
dos2unixCmd := NewShellCmd(strings.Join([]string{
"dos2unix",
"-l",
"-n",
src,
dst,
}, " "))
dos2unixCmd.ShowOutput = false
dos2unixCmd.Execute()
// ensure file permissions are correct
b, err := os.ReadFile(dst)
if err != nil {
return
return err
}
defer in.Close()
out, err := os.Create(dst)
err = os.WriteFile(dst, b, fi.Mode())
if err != nil {
return
return err
}
defer func() {
cerr := out.Close()
if err == nil {
err = cerr
}
}()
if _, err = io.Copy(out, in); err != nil {
return
}
err = out.Sync()
return
return nil
}
// DirectoryExists returns if a path exists and is a directory
@@ -133,7 +109,7 @@ func IsAbsPath(path string) bool {
// ListFilesWithPrefix lists files within a given path that have a given prefix
func ListFilesWithPrefix(path string, prefix string) []string {
names, err := ioutil.ReadDir(path)
names, err := os.ReadDir(path)
if err != nil {
return []string{}
}
@@ -144,7 +120,7 @@ func ListFilesWithPrefix(path string, prefix string) []string {
continue
}
if f.Mode().IsRegular() {
if f.Type().IsRegular() {
files = append(files, fmt.Sprintf("%s/%s", path, f.Name()))
}
}
@@ -218,33 +194,45 @@ func TouchFile(filename string) error {
}
defer file.Close()
file.Chmod(mode)
SetPermissions(filename, mode)
return nil
}
// WriteSliceToFile writes a slice of strings to a file
func WriteSliceToFile(filename string, lines []string) error {
mode := os.FileMode(0600)
if strings.HasPrefix(filename, "/etc/sudoers.d/") {
mode = os.FileMode(0440)
}
file, err := os.OpenFile(filename, os.O_RDWR|os.O_CREATE|os.O_TRUNC, mode)
if err != nil {
if err := file.Chmod(mode); err != nil {
return err
}
if err := SetPermissions(filename, mode); err != nil {
return err
}
return nil
}
type WriteSliceToFileInput struct {
Filename string
Lines []string
Mode os.FileMode
}
// WriteSliceToFile writes a slice of strings to a file
func WriteSliceToFile(input WriteSliceToFileInput) error {
file, err := os.OpenFile(input.Filename, os.O_RDWR|os.O_CREATE|os.O_TRUNC, input.Mode)
if err != nil {
return err
}
defer file.Close()
w := bufio.NewWriter(file)
for _, line := range lines {
for _, line := range input.Lines {
fmt.Fprintln(w, line)
}
if err = w.Flush(); err != nil {
return err
}
file.Chmod(mode)
SetPermissions(filename, mode)
if err := file.Chmod(input.Mode); err != nil {
return err
}
if err := SetPermissions(input.Filename, input.Mode); err != nil {
return err
}
return nil
}

View File

@@ -6,6 +6,8 @@ import (
"strconv"
"strings"
"sync"
"github.com/hashicorp/go-multierror"
)
// ErrWithExitCode wraps error and exposes an ExitCode method
@@ -54,7 +56,17 @@ func LogFail(text string) {
// LogFailWithError is the failure log formatter
// prints text to stderr and exits with the specified exit code
func LogFailWithError(err error) {
fmt.Fprintln(os.Stderr, fmt.Sprintf(" ! %s", err.Error()))
if err == nil {
return
}
if merr, ok := err.(*multierror.Error); ok {
for _, e := range merr.Errors {
fmt.Fprintf(os.Stderr, " ! %s\n", e.Error())
}
} else {
fmt.Fprintf(os.Stderr, " ! %s\n", err.Error())
}
if errExit, ok := err.(ErrWithExitCode); ok {
os.Exit(errExit.ExitCode())
}

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core common plugin"
version = "0.32.3"
version = "0.33.2"
[plugin.config]

25
plugins/common/plugn.go Normal file
View File

@@ -0,0 +1,25 @@
package common
import (
execute "github.com/alexellis/go-execute/v2"
)
type PlugnTriggerInput struct {
Args []string
CaptureOutput bool
Env map[string]string
StreamStdio bool
Trigger string
}
func CallPlugnTrigger(input PlugnTriggerInput) (execute.ExecResult, error) {
args := []string{"trigger", input.Trigger}
args = append(args, input.Args...)
return CallExecCommand(ExecCommandInput{
Command: "plugn",
Args: args,
CaptureOutput: input.CaptureOutput,
Env: input.Env,
StreamStdio: input.StreamStdio,
})
}

View File

@@ -4,7 +4,6 @@ import (
"bufio"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"reflect"
@@ -26,6 +25,12 @@ func CommandPropertySet(pluginName, appName, property, value string, properties
LogFail("No property specified")
}
for k := range globalProperties {
if _, ok := properties[k]; !ok {
properties[k] = ""
}
}
if _, ok := properties[property]; !ok {
properties := reflect.ValueOf(properties).MapKeys()
validPropertyList := make([]string, len(properties))
@@ -115,7 +120,7 @@ func PropertyGetAll(pluginName string, appName string) (map[string]string, error
return properties, errors.New("Specified property path is not a directory")
}
files, err := ioutil.ReadDir(pluginAppConfigRoot)
files, err := os.ReadDir(pluginAppConfigRoot)
if err != nil {
return properties, err
}
@@ -139,7 +144,7 @@ func PropertyGetDefault(pluginName, appName, property, defaultValue string) (val
}
propertyPath := getPropertyPath(pluginName, appName, property)
b, err := ioutil.ReadFile(propertyPath)
b, err := os.ReadFile(propertyPath)
if err != nil {
LogWarn(fmt.Sprintf("Unable to read %s property %s.%s", pluginName, appName, property))
return

252
plugins/common/sftp.go Normal file
View File

@@ -0,0 +1,252 @@
package common
import (
"context"
"errors"
"fmt"
"io"
"net/url"
"os"
"os/signal"
"path/filepath"
"strconv"
"syscall"
"github.com/melbahja/goph"
"golang.org/x/crypto/ssh"
)
// SftpCopyInput is the input for CallSftpCopy
type SftpCopyInput struct {
// AllowUknownHosts allows connecting to hosts with unknown host keys
AllowUknownHosts bool
// DestinationPath is the path to copy the file to
DestinationPath string
// RemoteHost is the remote host to connect to
RemoteHost string
// SourcePath is the path to the file to copy
SourcePath string
}
// CallSftpCopy copies a file to a remote host via sftp
func CallSftpCopy(input SftpCopyInput) (SftpCopyResult, error) {
signals := make(chan os.Signal, 1)
signal.Notify(signals, os.Interrupt, syscall.SIGHUP,
syscall.SIGINT,
syscall.SIGQUIT,
syscall.SIGTERM)
ctx, cancel := context.WithCancel(context.Background())
go func() {
<-signals
cancel()
}()
u, err := url.Parse(input.RemoteHost)
if err != nil {
return SftpCopyResult{}, fmt.Errorf("failed to parse remote host: %w", err)
}
if u.Scheme == "" {
return SftpCopyResult{}, fmt.Errorf("missing remote host ssh scheme in remote host: %s", input.RemoteHost)
}
if u.Scheme != "ssh" {
return SftpCopyResult{}, fmt.Errorf("invalid remote host scheme: %s", u.Scheme)
}
username := ""
password := ""
if u.User != nil {
username = u.User.Username()
if pass, ok := u.User.Password(); ok {
password = pass
}
}
if username == "" {
username = os.Getenv("USER")
}
portStr := u.Port()
port := 0
if portStr != "" {
portVal, err := strconv.Atoi(portStr)
if err != nil {
return SftpCopyResult{}, fmt.Errorf("failed to parse port: %w", err)
}
port = portVal
}
if port == 0 {
port = 22
}
sshKeyPath := filepath.Join(os.Getenv("DOKKU_ROOT"), ".ssh/id_ed25519")
if !FileExists(sshKeyPath) {
sshKeyPath = filepath.Join(os.Getenv("DOKKU_ROOT"), ".ssh/id_rsa")
}
if !FileExists(sshKeyPath) {
return SftpCopyResult{}, errors.New("ssh key not found at ~/.ssh/id_ed25519 or ~/.ssh/id_rsa")
}
cmd := SftpCopyTask{
SourcePath: input.SourcePath,
DestinationPath: input.DestinationPath,
AllowUknownHosts: input.AllowUknownHosts,
Hostname: u.Hostname(),
Port: uint(port),
Username: username,
Password: password,
SshKeyPath: sshKeyPath,
}
if os.Getenv("DOKKU_TRACE") == "1" {
cmd.PrintCommand = true
}
res, err := cmd.Execute(ctx)
if err != nil {
return res, err
}
return res, nil
}
type SftpCopyTask struct {
// SourcePath is the path to the file to copy
SourcePath string
// DestinationPath is the path to copy the file to
DestinationPath string
// Shell run the command in a bash shell.
// Note that the system must have `bash` installed in the PATH or in /bin/bash
Shell bool
// Stdin connect a reader to stdin for the command
// being executed.
Stdin io.Reader
// PrintCommand prints the command before executing
PrintCommand bool
// AllowUknownHosts allows connecting to hosts with unknown host keys
AllowUknownHosts bool
// Hostname is the hostname to connect to
Hostname string
// Port is the port to connect to
Port uint
// Username is the username to connect with
Username string
// Password is the password to connect with
Password string
// SshKeyPath is the path to the ssh key to use
SshKeyPath string
}
// SftpCopyResult is the result of executing an SftpCopyTask
type SftpCopyResult struct {
ExitErr error
Cancelled bool
}
// Execute runs the task
func (task SftpCopyTask) Execute(ctx context.Context) (SftpCopyResult, error) {
if task.SourcePath == "" {
return SftpCopyResult{}, errors.New("source path is required")
}
if task.DestinationPath == "" {
return SftpCopyResult{}, errors.New("destination path is required")
}
if task.Hostname == "" {
return SftpCopyResult{}, errors.New("hostname is required")
}
if task.SshKeyPath == "" {
return SftpCopyResult{}, errors.New("ssh key path is required")
}
if task.Username == "" {
return SftpCopyResult{}, errors.New("username is required")
}
if task.Port == 0 {
task.Port = 22
}
auth, err := goph.Key(task.SshKeyPath, "")
if err != nil {
return SftpCopyResult{}, fmt.Errorf("failed to load ssh key: %w", err)
}
callback, err := goph.DefaultKnownHosts()
if err != nil {
return SftpCopyResult{}, fmt.Errorf("failed to load known hosts: %w", err)
}
if task.AllowUknownHosts {
callback = ssh.InsecureIgnoreHostKey()
}
connectionConf := goph.Config{
User: task.Username,
Addr: task.Hostname,
Port: task.Port,
Timeout: goph.DefaultTimeout,
Callback: callback,
Auth: auth,
}
if task.Password != "" {
connectionConf.Auth = goph.Password(task.Password)
}
client, err := goph.NewConn(&connectionConf)
if err != nil {
return SftpCopyResult{}, fmt.Errorf("failed to create ssh client: %w", err)
}
defer client.Close()
// don't try to run if the context is already cancelled
if ctx.Err() != nil {
return SftpCopyResult{
Cancelled: ctx.Err() == context.Canceled,
}, ctx.Err()
}
if task.PrintCommand {
LogDebug(fmt.Sprintf("ssh %s@%s cp %s %v", task.Username, task.Hostname, task.SourcePath, task.DestinationPath))
}
sftp, err := client.NewSftp()
if err != nil {
return SftpCopyResult{}, fmt.Errorf("failed to create sftp client: %w", err)
}
contents, err := os.ReadFile(task.SourcePath)
if err != nil {
return SftpCopyResult{}, fmt.Errorf("failed to read source file: %w", err)
}
dstFile, err := sftp.Create(task.DestinationPath)
if err != nil {
return SftpCopyResult{}, fmt.Errorf("failed to create destination file: %w", err)
}
_, err = dstFile.Write(contents)
if err != nil {
return SftpCopyResult{}, fmt.Errorf("failed to write to destination file: %w", err)
}
err = dstFile.Close()
if err != nil {
return SftpCopyResult{}, fmt.Errorf("failed to create ssh command: %w", err)
}
err = sftp.Close()
return SftpCopyResult{
ExitErr: err,
Cancelled: ctx.Err() == context.Canceled,
}, ctx.Err()
}

382
plugins/common/ssh.go Normal file
View File

@@ -0,0 +1,382 @@
package common
import (
"bytes"
"context"
"errors"
"fmt"
"io"
"net/url"
"os"
"os/exec"
"os/signal"
"path/filepath"
"strconv"
"strings"
"syscall"
"github.com/fatih/color"
"github.com/melbahja/goph"
"golang.org/x/crypto/ssh"
)
// SshCommandInput is the input for CallSshCommand
type SshCommandInput struct {
// Command is the command to execute. This can be the path to an executable
// or the executable with arguments.
//
// Any arguments must be given via Args
Command string
// Args are the arguments to pass to the command.
Args []string
// CaptureOutput saves any output from in the TaskResult
CaptureOutput bool
// Env is a list of environment variables to add to the current environment
Env map[string]string
// AllowUknownHosts allows connecting to hosts with unknown host keys
AllowUknownHosts bool
// RemoteHost is the remote host to connect to
RemoteHost string
// StreamStdio prints stdout and stderr directly to os.Stdout/err as
// the command runs.
StreamStdio bool
// Sudo runs the command with sudo -n -u root
Sudo bool
}
// CallSshCommand executes a command on a remote host via ssh
func CallSshCommand(input SshCommandInput) (SshResult, error) {
signals := make(chan os.Signal, 1)
signal.Notify(signals, os.Interrupt, syscall.SIGHUP,
syscall.SIGINT,
syscall.SIGQUIT,
syscall.SIGTERM)
ctx, cancel := context.WithCancel(context.Background())
go func() {
<-signals
cancel()
}()
// hack: colors do not work natively with io.MultiWriter
// as it isn't detected as a tty. If the output isn't
// being captured, then color output can be forced.
isatty := !color.NoColor
env := []string{}
if input.Env != nil {
for k, v := range input.Env {
env = append(env, fmt.Sprintf("%s=%s", k, v))
}
}
u, err := url.Parse(input.RemoteHost)
if err != nil {
return SshResult{}, fmt.Errorf("failed to parse remote host: %w", err)
}
if u.Scheme == "" {
return SshResult{}, fmt.Errorf("missing remote host ssh scheme in remote host: %s", input.RemoteHost)
}
if u.Scheme != "ssh" {
return SshResult{}, fmt.Errorf("invalid remote host scheme: %s", u.Scheme)
}
username := ""
password := ""
if u.User != nil {
username = u.User.Username()
if pass, ok := u.User.Password(); ok {
password = pass
}
}
if username == "" {
username = os.Getenv("USER")
}
portStr := u.Port()
port := 0
if portStr != "" {
portVal, err := strconv.Atoi(portStr)
if err != nil {
return SshResult{}, fmt.Errorf("failed to parse port: %w", err)
}
port = portVal
}
if port == 0 {
port = 22
}
sshKeyPath := filepath.Join(os.Getenv("DOKKU_ROOT"), ".ssh/id_ed25519")
if !FileExists(sshKeyPath) {
sshKeyPath = filepath.Join(os.Getenv("DOKKU_ROOT"), ".ssh/id_rsa")
}
if !FileExists(sshKeyPath) {
return SshResult{}, errors.New("ssh key not found at ~/.ssh/id_ed25519 or ~/.ssh/id_rsa")
}
cmd := SshTask{
Command: input.Command,
Args: input.Args,
Env: env,
DisableStdioBuffer: !input.CaptureOutput,
AllowUknownHosts: input.AllowUknownHosts,
Hostname: u.Hostname(),
Port: uint(port),
Username: username,
Password: password,
SshKeyPath: sshKeyPath,
Sudo: input.Sudo,
}
if os.Getenv("DOKKU_TRACE") == "1" {
cmd.PrintCommand = true
}
if isatty {
cmd.Stdin = os.Stdin
}
if input.StreamStdio {
cmd.StreamStdio = true
}
res, err := cmd.Execute(ctx)
if err != nil {
return res, err
}
if res.ExitCode != 0 {
return res, errors.New(res.Stderr)
}
return res, nil
}
// SshTask is a task for executing a command on a remote host via ssh
type SshTask struct {
// Command is the command to execute. This can be the path to an executable
// or the executable with arguments.
//
// Any arguments must be given via Args
Command string
// Args are the arguments to pass to the command.
Args []string
// Shell run the command in a bash shell.
// Note that the system must have `bash` installed in the PATH or in /bin/bash
Shell bool
// Env is a list of environment variables to add to the current environment
Env []string
// Stdin connect a reader to stdin for the command
// being executed.
Stdin io.Reader
// PrintCommand prints the command before executing
PrintCommand bool
// StreamStdio prints stdout and stderr directly to os.Stdout/err as
// the command runs.
StreamStdio bool
// DisableStdioBuffer prevents any output from being saved in the
// TaskResult, which is useful for when the result is very large, or
// when you want to stream the output to another writer exclusively.
DisableStdioBuffer bool
// StdoutWriter when set will receive a copy of stdout from the command
StdOutWriter io.Writer
// StderrWriter when set will receive a copy of stderr from the command
StdErrWriter io.Writer
// AllowUknownHosts allows connecting to hosts with unknown host keys
AllowUknownHosts bool
// Hostname is the hostname to connect to
Hostname string
// Port is the port to connect to
Port uint
// Username is the username to connect with
Username string
// Password is the password to connect with
Password string
// SshKeyPath is the path to the ssh key to use
SshKeyPath string
// Sudo runs the command with sudo -n -u root
Sudo bool
}
// SshResult is the result of executing a command on a remote host via ssh
type SshResult struct {
Stdout string
Stderr string
ExitCode int
Cancelled bool
}
// Execute runs the task
func (task SshTask) Execute(ctx context.Context) (SshResult, error) {
if task.Command == "" {
return SshResult{}, errors.New("command is required")
}
if task.Hostname == "" {
return SshResult{}, errors.New("hostname is required")
}
if task.SshKeyPath == "" {
return SshResult{}, errors.New("ssh key path is required")
}
if task.Username == "" {
return SshResult{}, errors.New("username is required")
}
if task.Port == 0 {
task.Port = 22
}
if err := TouchFile(filepath.Join(os.Getenv("DOKKU_ROOT"), ".ssh", "known_hosts")); err != nil {
return SshResult{}, fmt.Errorf("failed to touch known_hosts file: %w", err)
}
auth, err := goph.Key(task.SshKeyPath, "")
if err != nil {
return SshResult{}, fmt.Errorf("failed to load ssh key: %w", err)
}
callback, err := goph.DefaultKnownHosts()
if err != nil {
return SshResult{}, fmt.Errorf("failed to load known hosts: %w", err)
}
if task.AllowUknownHosts {
callback = ssh.InsecureIgnoreHostKey()
}
connectionConf := goph.Config{
User: task.Username,
Addr: task.Hostname,
Port: task.Port,
Timeout: goph.DefaultTimeout,
Callback: callback,
Auth: auth,
}
if task.Password != "" {
connectionConf.Auth = goph.Password(task.Password)
}
client, err := goph.NewConn(&connectionConf)
if err != nil {
return SshResult{}, fmt.Errorf("failed to create ssh client: %w", err)
}
defer client.Close()
// don't try to run if the context is already cancelled
if ctx.Err() != nil {
return SshResult{
// the exec package returns -1 for cancelled commands
ExitCode: -1,
Cancelled: ctx.Err() == context.Canceled,
}, ctx.Err()
}
var command string
var commandArgs []string
if task.Shell {
command = "bash"
if len(task.Args) == 0 {
// use Split and Join to remove any extra whitespace?
startArgs := strings.Split(task.Command, " ")
script := strings.Join(startArgs, " ")
commandArgs = append([]string{"-c"}, script)
} else {
script := strings.Join(task.Args, " ")
commandArgs = append([]string{"-c"}, fmt.Sprintf("%s %s", task.Command, script))
}
} else {
command = task.Command
commandArgs = task.Args
}
if task.Sudo {
commandArgs = append([]string{"-n", "-u", "root", command}, commandArgs...)
command = "sudo"
}
if task.PrintCommand {
LogDebug(fmt.Sprintf("ssh %s@%s %s %v", task.Username, task.Hostname, command, commandArgs))
}
cmd, err := client.CommandContext(ctx, command, commandArgs...)
if err != nil {
return SshResult{}, fmt.Errorf("failed to create ssh command: %w", err)
}
if len(task.Env) > 0 {
overrides := map[string]bool{}
for _, env := range task.Env {
key := strings.Split(env, "=")[0]
overrides[key] = true
cmd.Env = append(cmd.Env, env)
}
}
if task.Stdin != nil {
cmd.Stdin = task.Stdin
}
stdoutBuff := bytes.Buffer{}
stderrBuff := bytes.Buffer{}
var stdoutWriters []io.Writer
var stderrWriters []io.Writer
if !task.DisableStdioBuffer {
stdoutWriters = append(stdoutWriters, &stdoutBuff)
stderrWriters = append(stderrWriters, &stderrBuff)
}
if task.StreamStdio {
stdoutWriters = append(stdoutWriters, os.Stdout)
stderrWriters = append(stderrWriters, os.Stderr)
}
if task.StdOutWriter != nil {
stdoutWriters = append(stdoutWriters, task.StdOutWriter)
}
if task.StdErrWriter != nil {
stderrWriters = append(stderrWriters, task.StdErrWriter)
}
cmd.Stdout = io.MultiWriter(stdoutWriters...)
cmd.Stderr = io.MultiWriter(stderrWriters...)
startErr := cmd.Start()
if startErr != nil {
return SshResult{}, startErr
}
exitCode := 0
execErr := cmd.Wait()
if execErr != nil {
if exitError, ok := execErr.(*exec.ExitError); ok {
exitCode = exitError.ExitCode()
}
}
return SshResult{
Stdout: stdoutBuff.String(),
Stderr: stderrBuff.String(),
ExitCode: exitCode,
Cancelled: ctx.Err() == context.Canceled,
}, ctx.Err()
}

View File

@@ -2,7 +2,7 @@ package common
import (
"fmt"
"io/ioutil"
"io"
"os"
"os/exec"
"path/filepath"
@@ -104,8 +104,8 @@ func PlugnTriggerOutput(triggerName string, args ...string) ([]byte, error) {
wE.Close()
wO.Close()
readStderr, _ := ioutil.ReadAll(rE)
readStdout, _ := ioutil.ReadAll(rO)
readStderr, _ := io.ReadAll(rE)
readStdout, _ := io.ReadAll(rO)
stderr := string(readStderr[:])
if err != nil {

View File

@@ -1,3 +1,4 @@
GOARCH ?= amd64
SUBCOMMANDS = subcommands/bundle subcommands/clear subcommands/export subcommands/get subcommands/keys subcommands/show subcommands/set subcommands/unset
TRIGGERS = triggers/config-export triggers/config-get triggers/config-get-global
BUILD = commands config_sub subcommands triggers
@@ -7,6 +8,6 @@ clean-config_sub:
rm -rf config_sub
config_sub: clean-config_sub **/**/config_sub.go
go build -ldflags="-s -w" $(GO_ARGS) -o config_sub src/config_sub/config_sub.go
GOARCH=$(GOARCH) go build -ldflags="-s -w" $(GO_ARGS) -o config_sub src/config_sub/config_sub.go
include ../../common.mk

View File

@@ -1,7 +1,6 @@
package config
import (
"io/ioutil"
"os"
"strings"
"testing"
@@ -29,12 +28,12 @@ func setupTests() (err error) {
func setupTestApp() (err error) {
Expect(os.MkdirAll(testAppDir, 0766)).To(Succeed())
b := []byte("export testKey=TESTING\n")
if err = ioutil.WriteFile(strings.Join([]string{testAppDir, "/ENV"}, ""), b, 0644); err != nil {
if err = os.WriteFile(strings.Join([]string{testAppDir, "/ENV"}, ""), b, 0644); err != nil {
return
}
b = []byte("export testKey=GLOBAL_TESTING\nexport globalKey=GLOBAL_VALUE")
if err = ioutil.WriteFile(globalConfigFile, b, 0644); err != nil {
if err = os.WriteFile(globalConfigFile, b, 0644); err != nil {
return
}
return
@@ -179,7 +178,7 @@ func TestInvalidEnvOnDisk(t *testing.T) {
appConfigFile := strings.Join([]string{testAppDir, "/ENV"}, "")
b := []byte("export --invalid-key=TESTING\nexport valid_key=value\n")
if err := ioutil.WriteFile(appConfigFile, b, 0644); err != nil {
if err := os.WriteFile(appConfigFile, b, 0644); err != nil {
return
}
@@ -192,7 +191,7 @@ func TestInvalidEnvOnDisk(t *testing.T) {
Expect(value).To(Equal("value"))
//LoadAppEnv eliminates it from the file
content, err := ioutil.ReadFile(appConfigFile)
content, err := os.ReadFile(appConfigFile)
Expect(err).NotTo(HaveOccurred())
Expect(strings.Contains(string(content), "--invalid-key")).To(BeFalse())

View File

@@ -5,20 +5,31 @@ go 1.21
require (
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
github.com/joho/godotenv v1.2.0
github.com/onsi/gomega v1.30.0
github.com/onsi/gomega v1.31.1
github.com/ryanuber/columnize v2.1.2+incompatible
github.com/spf13/pflag v1.0.5
)
require (
github.com/alexellis/go-execute/v2 v2.2.1 // indirect
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/melbahja/goph v1.4.0 // indirect
github.com/otiai10/copy v1.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/sftp v1.13.5 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

View File

@@ -1,40 +1,108 @@
github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI=
github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY=
github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/joho/godotenv v1.2.0 h1:vGTvz69FzUFp+X4/bAkb0j5BoLC+9bpqTWY8mjhA9pc=
github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4=
github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/melbahja/goph v1.4.0 h1:z0PgDbBFe66lRYl3v5dGb9aFgPy0kotuQ37QOwSQFqs=
github.com/melbahja/goph v1.4.0/go.mod h1:uG+VfK2Dlhk+O32zFrRlc3kYKTlV6+BtvPWd/kK7U68=
github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY=
github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM=
github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo=
github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0=
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w=
github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks=
github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.13.5 h1:a3RLUqkyjYRtBTZJZ1VRrKbN3zhuPLlUc3sphVz81go=
github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/ryanuber/columnize v2.1.2+incompatible h1:C89EOx/XBWwIXl8wm8OPJBd7kPF25UfsK2X7Ph/zCAk=
github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss=
golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE=
golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA=
golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

Some files were not shown because too many files have changed in this diff Show More