wokku-cli 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -0
- data/lib/wokku/commands/bucket.rb +56 -0
- data/lib/wokku/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 48fc9e0bee672d55ceff412f082299e1758af711f412445ae5afa06d51737578
|
|
4
|
+
data.tar.gz: 9f76fd4142865f2e2ff3a6cbd2ba54c1e6b1c934d43419756729b15dc54dc322
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f5dcab4511394cd6650e33394aa078013470ee12bf22322eda3a46778f65fd7c6d3b4c5e20bb8d34a52b50b8afab81ffa0e8fc817e9a555128207cdd885086b6
|
|
7
|
+
data.tar.gz: 948b3df0aa6441118186ba27bd4daaf3c0bb004035e486fe3aa12946f1b436f7a1ae73277b1ac37465f8e60d82fee43bcab3725b5fc882cfbb4e95ae1d8c6b05
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.0 — 2026-11-22
|
|
4
|
+
|
|
5
|
+
- `bucket APP [--reveal]` — show an app's object storage bucket (endpoint, usage, keys; the secret only with `--reveal`).
|
|
6
|
+
- `bucket:create APP` — enable object storage; the app gets `S3_*` env vars and restarts when ready.
|
|
7
|
+
- `bucket:resize APP GB`, `bucket:rotate APP`, `bucket:destroy APP` — change the quota, rotate keys, delete the bucket and its files.
|
|
8
|
+
|
|
3
9
|
## 0.10.0 — 2026-11-01
|
|
4
10
|
|
|
5
11
|
- `previews:settings APP [--on|--off] [--database empty|snapshot|shared]` — set up PR previews.
|
data/README.md
CHANGED
|
@@ -35,6 +35,7 @@ Run `wokku --help` for the full list. ~30 first-class commands today, grouped:
|
|
|
35
35
|
- **Config:** `config`, `config:set`, `config:get`, `config:unset`, `config:export`
|
|
36
36
|
- **Domains + SSL:** `domains`, `domains:add/remove/clear`, `certs:enable`, `certs:disable`
|
|
37
37
|
- **Databases:** `databases`, `databases:create/destroy/link/unlink/info`, `backups`, `backups:create/restore`
|
|
38
|
+
- **Object storage:** `bucket`, `bucket:create/resize/rotate/destroy`
|
|
38
39
|
- **SSH keys:** `ssh-keys`, `ssh-keys:add/remove`
|
|
39
40
|
- **Servers:** `servers`, `servers:info`, `servers:default` (multi-Dokku-host installs)
|
|
40
41
|
- **Teams:** `teams`, `teams:members`, `teams:invite`, `teams:remove`
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# --- Object storage (one S3-compatible bucket per app) ---
|
|
4
|
+
# Named "bucket" so it can't be confused with the old volume `storage` API.
|
|
5
|
+
# The S3_* / AWS_* env vars are set on the app automatically.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# The API returns the secret to team members; keep it off the terminal
|
|
9
|
+
# (and out of --json) unless asked for with --reveal.
|
|
10
|
+
def print_bucket(data, reveal: false)
|
|
11
|
+
data = data.reject { |k, _| k == "secret_access_key" } unless reveal
|
|
12
|
+
Wokku::Output.render(data) do |b|
|
|
13
|
+
puts "Bucket: #{b['bucket']}"
|
|
14
|
+
puts "Status: #{b['status']}"
|
|
15
|
+
puts "Used: #{b['used_gb']} / #{b['quota_gb']} GB"
|
|
16
|
+
puts "Endpoint: #{b['endpoint']}"
|
|
17
|
+
puts "Region: #{b['region']}"
|
|
18
|
+
puts "Access: #{b['access_key_id']}"
|
|
19
|
+
puts "Secret: #{reveal ? b['secret_access_key'] : '(hidden; add --reveal)'}"
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
register "bucket", "Show an app's object storage bucket (usage: wokku bucket APP [--reveal])" do
|
|
24
|
+
app = ARGV.shift || abort("Usage: wokku bucket APP [--reveal]")
|
|
25
|
+
print_bucket(api(:get, "/apps/#{app}/object_storage"), reveal: ARGV.delete("--reveal"))
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
register "bucket:create", "Enable object storage for an app (usage: wokku bucket:create APP)" do
|
|
29
|
+
app = ARGV.shift || abort("Usage: wokku bucket:create APP")
|
|
30
|
+
data = api(:post, "/apps/#{app}/object_storage")
|
|
31
|
+
Wokku::Output.render(data.reject { |k, _| k == "secret_access_key" }) do |b|
|
|
32
|
+
puts "Bucket #{b['bucket']} is provisioning. The app gets S3_* env vars and restarts when it's ready."
|
|
33
|
+
puts "Check: wokku bucket #{app}"
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
register "bucket:resize", "Change the bucket quota in GB (usage: wokku bucket:resize APP GB)" do
|
|
38
|
+
app = ARGV.shift || abort("Usage: wokku bucket:resize APP GB")
|
|
39
|
+
gb = Integer(ARGV.shift.to_s, exception: false) || abort("Usage: wokku bucket:resize APP GB (a whole number, 1-1024)")
|
|
40
|
+
data = api(:patch, "/apps/#{app}/object_storage", { quota_gb: gb })
|
|
41
|
+
Wokku::Output.status "Quota for #{app}: #{data['quota_gb']} GB"
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
register "bucket:rotate", "Rotate the bucket's access keys; the app restarts onto them (usage: wokku bucket:rotate APP)" do
|
|
45
|
+
app = ARGV.shift || abort("Usage: wokku bucket:rotate APP")
|
|
46
|
+
api(:post, "/apps/#{app}/object_storage/rotate")
|
|
47
|
+
Wokku::Output.status "Rotating keys for #{app}. The old key stops working now; the app restarts with the new one."
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
register "bucket:destroy", "Delete the bucket and all its files (usage: wokku bucket:destroy APP)" do
|
|
51
|
+
app = ARGV.shift || abort("Usage: wokku bucket:destroy APP")
|
|
52
|
+
print "Delete #{app}'s bucket and ALL its files? This cannot be undone. (y/N): "
|
|
53
|
+
abort "Cancelled." unless $stdin.gets.to_s.strip.downcase == "y"
|
|
54
|
+
api(:delete, "/apps/#{app}/object_storage")
|
|
55
|
+
Wokku::Output.status "Deleting #{app}'s bucket."
|
|
56
|
+
end
|
data/lib/wokku/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wokku-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Johannes Dwicahyo
|
|
@@ -47,6 +47,7 @@ files:
|
|
|
47
47
|
- lib/wokku/commands/auth.rb
|
|
48
48
|
- lib/wokku/commands/backups.rb
|
|
49
49
|
- lib/wokku/commands/billing.rb
|
|
50
|
+
- lib/wokku/commands/bucket.rb
|
|
50
51
|
- lib/wokku/commands/cdn.rb
|
|
51
52
|
- lib/wokku/commands/certs.rb
|
|
52
53
|
- lib/wokku/commands/checks.rb
|