From beb8dff68c928f5ec1bb26c61688a4c8a1fba2ec Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 24 Nov 2022 14:46:51 -0500 Subject: [PATCH 1/2] docs: cleanup builder docs a little --- .../builders/cloud-native-buildpacks.md | 29 +++++++++++-------- docs/deployment/builders/dockerfiles.md | 29 +++++++++++-------- docs/deployment/builders/lambda.md | 29 +++++++++++-------- 3 files changed, 51 insertions(+), 36 deletions(-) diff --git a/docs/deployment/builders/cloud-native-buildpacks.md b/docs/deployment/builders/cloud-native-buildpacks.md index edf63236e..85ba3e8c2 100644 --- a/docs/deployment/builders/cloud-native-buildpacks.md +++ b/docs/deployment/builders/cloud-native-buildpacks.md @@ -2,6 +2,11 @@ > New as of 0.22.0 +``` +builder-pack:report [] [] # Displays a builder-pack report for one or more apps +builder-pack:set () # Set or clear a builder-pack property for an app +``` + ``` buildpacks:set-property [--global|] # Set or clear a buildpacks property for an app ``` @@ -89,17 +94,17 @@ dokku builder-pack:report ``` =====> node-js-app builder-pack information - Builder-pack computed projecttoml path: project2.toml - Builder-pack global projecttoml path: project.toml - Builder-pack projecttoml path: project2.toml + Builder pack computed projecttoml path: project2.toml + Builder pack global projecttoml path: project.toml + Builder pack projecttoml path: project2.toml =====> python-sample builder-pack information - Builder-pack computed projecttoml path: project.toml - Builder-pack global projecttoml path: project.toml - Builder-pack projecttoml path: + Builder pack computed projecttoml path: project.toml + Builder pack global projecttoml path: project.toml + Builder pack projecttoml path: =====> ruby-sample builder-pack information - Builder-pack computed projecttoml path: project.toml - Builder-pack global projecttoml path: project.json - Builder-pack projecttoml path: + Builder pack computed projecttoml path: project.toml + Builder pack global projecttoml path: project.json + Builder pack projecttoml path: ``` You can run the command for a specific app also. @@ -110,9 +115,9 @@ dokku builder-pack:report node-js-app ``` =====> node-js-app builder-pack information - Builder-pack computed projecttoml path: project2.toml - Builder-pack global projecttoml path: project.toml - Builder-pack projecttoml path: project2.toml + Builder pack computed projecttoml path: project2.toml + Builder pack global projecttoml path: project.toml + Builder pack projecttoml path: project2.toml ``` You can pass flags which will output only the value of the specific information you want. For example: diff --git a/docs/deployment/builders/dockerfiles.md b/docs/deployment/builders/dockerfiles.md index 07aabe090..05b1f2ce9 100644 --- a/docs/deployment/builders/dockerfiles.md +++ b/docs/deployment/builders/dockerfiles.md @@ -2,6 +2,11 @@ > New as of 0.3.15 +``` +builder-dockerfile:report [] [] # Displays a builder-dockerfile report for one or more apps +builder-dockerfile:set () # Set or clear a builder-dockerfile property for an app +``` + While Dokku normally defaults to using [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) for deployment, you can also use Docker's native `Dockerfile` system to define a container. > Dockerfile support is considered a *power user* feature. By using Dockerfile-based deployment, you agree that you will not have the same comfort as that enjoyed by buildpack users, and Dokku features may work differently. Differences between the two systems will be documented here. @@ -67,17 +72,17 @@ dokku builder-dockerfile:report ``` =====> node-js-app builder-dockerfile information - Builder-dockerfile computed dockerfile path: Dockerfile2 - Builder-dockerfile global dockerfile path: Dockerfile - Builder-dockerfile dockerfile path: Dockerfile2 + Builder dockerfile computed dockerfile path: Dockerfile2 + Builder dockerfile global dockerfile path: Dockerfile + Builder dockerfile dockerfile path: Dockerfile2 =====> python-sample builder-dockerfile information - Builder-dockerfile computed dockerfile path: Dockerfile - Builder-dockerfile global dockerfile path: Dockerfile - Builder-dockerfile dockerfile path: + Builder dockerfile computed dockerfile path: Dockerfile + Builder dockerfile global dockerfile path: Dockerfile + Builder dockerfile dockerfile path: =====> ruby-sample builder-dockerfile information - Builder-dockerfile computed dockerfile path: Dockerfile - Builder-dockerfile global dockerfile path: Dockerfile - Builder-dockerfile dockerfile path: + Builder dockerfile computed dockerfile path: Dockerfile + Builder dockerfile global dockerfile path: Dockerfile + Builder dockerfile dockerfile path: ``` You can run the command for a specific app also. @@ -88,9 +93,9 @@ dokku builder-dockerfile:report node-js-app ``` =====> node-js-app builder-dockerfile information - Builder-dockerfile computed dockerfile path: Dockerfile2 - Builder-dockerfile global dockerfile path: Dockerfile - Builder-dockerfile dockerfile path: Dockerfile2 + Builder dockerfile computed dockerfile path: Dockerfile2 + Builder dockerfile global dockerfile path: Dockerfile + Builder dockerfile dockerfile path: Dockerfile2 ``` You can pass flags which will output only the value of the specific information you want. For example: diff --git a/docs/deployment/builders/lambda.md b/docs/deployment/builders/lambda.md index 0cc0b0884..1248f8fb9 100644 --- a/docs/deployment/builders/lambda.md +++ b/docs/deployment/builders/lambda.md @@ -2,6 +2,11 @@ > New as of 0.28.0 +``` +builder-lambda:report [] [] # Displays a builder-lambda report for one or more apps +builder-lambda:set () # Set or clear a builder-lambda property for an app +``` + The `lambda` builder builds AWS Lambda functions in an environment simulating AWS Lambda runtimes via [lambda-builder](https://github.com/dokku/lambda-builder). Apps built via this builder can run natively in Dokku and may also have their artifacts scheduled to Lambda via an appropriate scheduler. ## Usage @@ -70,17 +75,17 @@ dokku builder-lambda:report ``` =====> node-js-app builder-lambda information - Builder-lambda computed lambdayml path: lambda2.yml - Builder-lambda global lambdayml path: lambda.yml - Builder-lambda lambdayml path: lambda2.yml + Builder lambda computed lambdayml path: lambda2.yml + Builder lambda global lambdayml path: lambda.yml + Builder lambda lambdayml path: lambda2.yml =====> python-sample builder-lambda information - Builder-lambda computed lambdayml path: lambda.yml - Builder-lambda global lambdayml path: lambda.yml - Builder-lambda lambdayml path: + Builder lambda computed lambdayml path: lambda.yml + Builder lambda global lambdayml path: lambda.yml + Builder lambda lambdayml path: =====> ruby-sample builder-lambda information - Builder-lambda computed lambdayml path: lambda.yml - Builder-lambda global lambdayml path: lambda.yml - Builder-lambda lambdayml path: + Builder lambda computed lambdayml path: lambda.yml + Builder lambda global lambdayml path: lambda.yml + Builder lambda lambdayml path: ``` You can run the command for a specific app also. @@ -91,9 +96,9 @@ dokku builder-lambda:report node-js-app ``` =====> node-js-app builder-lambda information - Builder-lambda computed lambdayml path: lambda2.yml - Builder-lambda global lambdayml path: lambda.yml - Builder-lambda lambdayml path: lambda2.yml + Builder lambda computed lambdayml path: lambda2.yml + Builder lambda global lambdayml path: lambda.yml + Builder lambda lambdayml path: lambda2.yml ``` You can pass flags which will output only the value of the specific information you want. For example: From 7c5b0be2c32f61e0a2a8072862fadd5605705ce8 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 24 Nov 2022 14:47:13 -0500 Subject: [PATCH 2/2] chore: use the correct function when fetching properties with defaults --- plugins/builder-dockerfile/internal-functions | 4 ++-- plugins/builder-lambda/internal-functions | 4 ++-- plugins/builder-pack/internal-functions | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/builder-dockerfile/internal-functions b/plugins/builder-dockerfile/internal-functions index 219d7d3e9..a230f67b3 100755 --- a/plugins/builder-dockerfile/internal-functions +++ b/plugins/builder-dockerfile/internal-functions @@ -80,11 +80,11 @@ fn-builder-dockerfile-computed-dockerfile-path() { fn-builder-dockerfile-global-dockerfile-path() { declare APP="$1" - fn-plugin-property-get "builder-dockerfile" "--global" "dockerfile-path" "Dockerfile" + fn-plugin-property-get-default "builder-dockerfile" "--global" "dockerfile-path" "Dockerfile" } fn-builder-dockerfile-dockerfile-path() { declare APP="$1" - fn-plugin-property-get "builder-dockerfile" "$APP" "dockerfile-path" "" + fn-plugin-property-get-default "builder-dockerfile" "$APP" "dockerfile-path" "" } diff --git a/plugins/builder-lambda/internal-functions b/plugins/builder-lambda/internal-functions index d9341ae88..7a4738bfc 100755 --- a/plugins/builder-lambda/internal-functions +++ b/plugins/builder-lambda/internal-functions @@ -80,11 +80,11 @@ fn-builder-lambda-computed-lambdayml-path() { fn-builder-lambda-global-lambdayml-path() { declare APP="$1" - fn-plugin-property-get "builder-lambda" "--global" "lambdayml-path" "lambda.yml" + fn-plugin-property-get-default "builder-lambda" "--global" "lambdayml-path" "lambda.yml" } fn-builder-lambda-lambdayml-path() { declare APP="$1" - fn-plugin-property-get "builder-lambda" "$APP" "lambdayml-path" "" + fn-plugin-property-get-default "builder-lambda" "$APP" "lambdayml-path" "" } diff --git a/plugins/builder-pack/internal-functions b/plugins/builder-pack/internal-functions index 41d36353a..e1d6ecbb3 100755 --- a/plugins/builder-pack/internal-functions +++ b/plugins/builder-pack/internal-functions @@ -80,11 +80,11 @@ fn-builder-pack-computed-projecttoml-path() { fn-builder-pack-global-projecttoml-path() { declare APP="$1" - fn-plugin-property-get "builder-pack" "--global" "projecttoml-path" "project.toml" + fn-plugin-property-get-default "builder-pack" "--global" "projecttoml-path" "project.toml" } fn-builder-pack-projecttoml-path() { declare APP="$1" - fn-plugin-property-get "builder-pack" "$APP" "projecttoml-path" "" + fn-plugin-property-get-default "builder-pack" "$APP" "projecttoml-path" "" }