dokploytools 1.0.0__py3-none-win_amd64.whl
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.
dokploytools/__init__.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import os, subprocess, sys
|
|
2
|
+
|
|
3
|
+
def main():
|
|
4
|
+
exe = os.path.join(os.path.dirname(__file__), "bin", "dokploytools" + (".exe" if os.name == "nt" else ""))
|
|
5
|
+
if os.name == "nt":
|
|
6
|
+
sys.exit(subprocess.call([exe] + sys.argv[1:]))
|
|
7
|
+
os.chmod(exe, 0o755)
|
|
8
|
+
os.execv(exe, [exe] + sys.argv[1:])
|
|
Binary file
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: dokploytools
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: CLI to manage multiple Dokploy panels (binary build; alias: dpt)
|
|
5
|
+
Requires-Python: >=3.8
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Project-URL: Source, https://github.com/arian24b/dokploytools
|
|
8
|
+
|
|
9
|
+
# dokploytools
|
|
10
|
+
|
|
11
|
+
[فارسی](README.fa.md)
|
|
12
|
+
|
|
13
|
+
Go CLI to manage multiple [Dokploy](https://dokploy.com) panels. `NAME` = panel name; omit it (or use `all`) to run on every panel.
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
go build -o dokploytools ./src
|
|
17
|
+
ln -sf "$PWD/dokploytools" ~/.local/bin/dpt # short alias: dpt (or: alias dpt=dokploytools)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Global flags: `--json` (machine-readable rows, exit 1 if any panel errored) and `--watch SECS` (repeat).
|
|
21
|
+
|
|
22
|
+
## Panels & config
|
|
23
|
+
```
|
|
24
|
+
panel add NAME URL (--key KEY | --user EMAIL --pass PASS)
|
|
25
|
+
panel list | panel edit NAME [--url U] [--key K] | panel rm NAME | panel encrypt
|
|
26
|
+
```
|
|
27
|
+
- Stored in `~/.config/dokploytools/panels.json` (0600). Set `DOKPLOYTOOLS_PASSPHRASE` and keys are AES-GCM encrypted (scrypt) on save; `panel encrypt` seals an existing file.
|
|
28
|
+
- No file needed: `DOKPLOY_<NAME>_URL` + `DOKPLOY_<NAME>_KEY` define panel `<name>` (never written to disk).
|
|
29
|
+
|
|
30
|
+
## Overview
|
|
31
|
+
```
|
|
32
|
+
projects | status [--project P] | servers [--check] | containers [--stats]
|
|
33
|
+
deployments NAME PROJ/SVC | monitor | update [--check]
|
|
34
|
+
alert [--cpu 90 --mem 90 --disk 90 --cert-days 14 --no-certs --webhook URL --telegram TOKEN@CHATID]
|
|
35
|
+
```
|
|
36
|
+
`alert` exits 1 when the panel is down, a service/server is in error, a metric is over its limit or an HTTPS domain's cert is near expiry — put it in cron.
|
|
37
|
+
|
|
38
|
+
## Services
|
|
39
|
+
```
|
|
40
|
+
svc start|stop|deploy|redeploy NAME PROJ/SVC [--env E] [--wait] # NAME=all hits every panel
|
|
41
|
+
env NAME PROJ/SVC [set K=V.. | unset K.. | --file F]
|
|
42
|
+
```
|
|
43
|
+
**One-line compose deploy from a git repo** (creates project/environment/compose if missing, updates if present):
|
|
44
|
+
```
|
|
45
|
+
dokploytools deploy prod --repo https://github.com/me/app.git --branch main \
|
|
46
|
+
--domain app.example.com --service web --port 3000 --set KEY=val --wait
|
|
47
|
+
```
|
|
48
|
+
Other flags: `--project P` (default = repo name), `--env production`, `--name`, `--compose-path`, `--env-file F`, `--ssh-key-id`, `--server ID`, `--auto-deploy`, `--no-deploy`, `--no-https`; `--file compose.yml` deploys a local compose file instead of a repo.
|
|
49
|
+
|
|
50
|
+
## Backups
|
|
51
|
+
```
|
|
52
|
+
backup [NAME] [--dest D] [--keep N] [--download DIR] # panel (web-server) backup
|
|
53
|
+
dbbackup create NAME PROJ/SVC [--dest D --schedule "0 2 * * *" --keep 7 --database DB --prefix P --disabled]
|
|
54
|
+
dbbackup list NAME [PROJ/SVC] | run NAME PROJ/SVC [--id B] | set NAME BACKUPID [--schedule --keep --enable false] | rm NAME BACKUPID
|
|
55
|
+
dbbackup files NAME --dest D --search PREFIX | download NAME --dest D --search PREFIX --download DIR
|
|
56
|
+
dbbackup copy all --dest D --search PREFIX --to-endpoint E --to-bucket B --to-access K --to-secret S [--to-prefix P]
|
|
57
|
+
```
|
|
58
|
+
`backup`/`dbbackup run` also accept `--download DIR` and the `--to-*` flags (or `DOKPLOYTOOLS_TO_ENDPOINT/BUCKET/ACCESS/SECRET`) to mirror the new file into one central bucket under `<to-prefix>/<panel>/`. Postgres, MySQL, MariaDB, Mongo supported. **Restore is not exposed by Dokploy's REST API** (it uses a websocket subscription), so it is not implemented.
|
|
59
|
+
|
|
60
|
+
## Domains, certificates, Traefik
|
|
61
|
+
```
|
|
62
|
+
domains | domain add NAME PROJ/SVC --host H --port N [--service S] [--cert letsencrypt|none|custom] [--no-https]
|
|
63
|
+
domain rm NAME HOST | domain check NAME [HOST] # panel DNS check + live TLS expiry
|
|
64
|
+
cert list NAME | cert add NAME CERTNAME --cert fullchain.pem --key privkey.pem [--domain H] [--auto-renew] | cert rm NAME ID|NAME
|
|
65
|
+
traefik get NAME main|web|middleware | traefik get NAME --path FILE | traefik ls NAME
|
|
66
|
+
traefik set NAME main|web|middleware --from FILE | traefik reload NAME
|
|
67
|
+
```
|
|
68
|
+
For a domain whose DNS is **not** on the server (CDN/other host, so Let's Encrypt HTTP challenge fails): upload its cert with `cert add` (validated locally: key pair, expiry, `--domain` coverage), then add the domain with `--cert none`; Traefik serves the uploaded cert by SNI. `traefik set` saves the previous config to `traefik-<panel>-<file>-<ts>.bak` first.
|
|
69
|
+
|
|
70
|
+
## People
|
|
71
|
+
```
|
|
72
|
+
users | member invite NAME EMAIL [--role admin] | member rm NAME USERID | member invitations NAME | member uninvite NAME ID
|
|
73
|
+
apikey list|create NAME [--days N]|rm NAME ID | orgs
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Status
|
|
77
|
+
Endpoint paths and bodies follow the Dokploy docs reference. Untested against a live panel; **least certain**: `project.all` nesting (handled for environments and legacy layout), `user.getMetricsToken` / monitoring port + `/metrics`, `user.getContainerMetrics`, `auth/organization/invite-member` (better-auth), login → API key. Use `raw NAME GET PATH` to probe. `go test ./...` runs a mock-server deploy test.
|
|
78
|
+
|
|
79
|
+
## CI & releases
|
|
80
|
+
- `.github/workflows/ci.yml`: gofmt check, `go vet`, `go test -race` on every push to `main` and every PR.
|
|
81
|
+
- `.github/workflows/release.yml`: after CI passes on `main`, [python-semantic-release](https://python-semantic-release.readthedocs.io) reads the [conventional commits](https://www.conventionalcommits.org) since the last tag (`feat:` minor, `fix:`/`perf:` patch, `feat!:` / `BREAKING CHANGE` major), bumps the version, updates `CHANGELOG.md`, tags and creates the GitHub release. If a release was made, the same run builds the binaries (version embedded: `dokploytools version`), attaches them to the release and publishes the PyPI wheels. Commits without a releasable type (`docs:`, `chore:`, …) release nothing. Config: `semantic-release.toml`.
|
|
82
|
+
|
|
83
|
+
### PyPI
|
|
84
|
+
Each release also publishes platform wheels (the Go binary + `dokploytools`/`dpt` entry points) to PyPI: `pipx install dokploytools` (or `uv tool install dokploytools`), then run `dpt`. Needs the repo secret `PYPI_API_TOKEN`; versions are plain `X.Y.Z` (PEP 440). Wheels are built by `scripts/build_wheels.py` (stdlib only).
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
dokploytools/__init__.py,sha256=wpv2cgb8YHzu6lZ4OBLZ0QBTofbcj5ak7fC6yoo1bHI,296
|
|
2
|
+
dokploytools/bin/dokploytools.exe,sha256=JD-in_8i5cSapj5GFlnt3W-3Ft3E3R4bEuYo5xfHx9s,8201216
|
|
3
|
+
dokploytools-1.0.0.dist-info/METADATA,sha256=iJRk4hGzaIlLm3lEg9iunSWguGlkrhPZodaS-VPbtys,5804
|
|
4
|
+
dokploytools-1.0.0.dist-info/WHEEL,sha256=ZM8kpxMIfha-UglSiqPkolV7TwC77117I60t81eN704,90
|
|
5
|
+
dokploytools-1.0.0.dist-info/entry_points.txt,sha256=EajyeVxEy0k7dgg6f81drUjWZzqjBU_MTPdDo_FEOEE,75
|
|
6
|
+
dokploytools-1.0.0.dist-info/RECORD,,
|