Skip to content

Commit

Permalink
Merge pull request dokku#7587 from turicas/fix/docs-paketo
Browse files Browse the repository at this point in the history
Correctly name paketo chown option
  • Loading branch information
josegonzalez authored Mar 10, 2025
2 parents 0249653 + 96bb17d commit a6dd27e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/advanced-usage/persistent-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ By default, permissions are set for usage with Herokuish buildpacks. These permi
- This is used for apps deployed with Buildpacks via Herokuish.
- `--chown heroku`: Use `1000:1000` as the folder permissions.
- 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 paketo`: Use `2000:2000` as the folder permissions.
- This is used for apps deployed with Cloud Native Buildpacks using the `cloudfoundry/cnb` or `paketo` 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.
Expand Down
3 changes: 3 additions & 0 deletions plugins/storage/internal-functions
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ cmd-storage-ensure-directory() {
CHOWN_FLAG="1000"
elif [[ "$CHOWN_FLAG" == "packeto" ]]; then
CHOWN_FLAG="2000"
dokku_log_verbose "Detected deprecated chown flag 'packeto'. Using 'paketo' instead. Please update your configuration."
elif [[ "$CHOWN_FLAG" == "paketo" ]]; then
CHOWN_FLAG="2000"
elif [[ "$CHOWN_FLAG" == "root" ]]; then
CHOWN_FLAG="0"
elif [[ "$CHOWN_FLAG" == "false" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/storage.bats
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ teardown() {
assert_output_contains "Setting directory ownership to 2000:2000" 0
assert_output_contains "Setting directory ownership to 32767:32767" 0

run /bin/bash -c "dokku storage:ensure-directory --chown packeto $TEST_APP"
run /bin/bash -c "dokku storage:ensure-directory --chown paketo $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
Expand Down

0 comments on commit a6dd27e

Please sign in to comment.