@openinc/caddy-manager-cli 0.0.1 → 1.1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) open.INC GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # @openinc/caddy-manager-cli
2
+
3
+ Kommandozeilen-Werkzeug für den Caddy Manager: Static-/SPA-Deployments hochladen, live schalten und zurückrollen, z. B. aus einer CI-Pipeline.
4
+
5
+ Die Version des CLI entspricht der Version des Caddy-Manager-Images, mit dem es spricht.
6
+
7
+ ## Aufruf
8
+
9
+ ```bash
10
+ npx -y @openinc/caddy-manager-cli --help
11
+ ```
12
+
13
+ Voraussetzung: Node.js ≥ 22.12. Das Paket hat keine Laufzeit-Abhängigkeiten.
14
+
15
+ ## Verbindung
16
+
17
+ | Option | Umgebungsvariable | Beispiel |
18
+ | ------------ | ----------------- | --------------------------------- |
19
+ | `--url` | `CM_URL` | `https://manage.example.com:8443` |
20
+ | `--user` | `CM_USER` | `ci` |
21
+ | `--password` | `CM_PASSWORD` | |
22
+
23
+ Nutzt die Verwaltung ein Zertifikat der internen Caddy-CA, die Root-CA per `NODE_EXTRA_CA_CERTS=/pfad/zur/root.crt` bekannt machen.
24
+
25
+ ## Befehle
26
+
27
+ | Befehl | Zweck |
28
+ | ------------------------------------ | ------------------------------------------------------------- |
29
+ | `sites [--json]` | Alle Sites auflisten |
30
+ | `deployments <site> [--json]` | Deployments einer Site |
31
+ | `deploy <site> <ordner\|datei.zip>` | Hochladen und live schalten (`--branch`, `--no-activate`, `--keep N`) |
32
+ | `activate <site> <deployment-id>` | Bestimmtes Deployment live schalten |
33
+ | `rollback <site> [deployment-id]` | Ohne ID: zurück auf das vorherige Deployment |
34
+ | `prune <site> [--keep N]` | Alte Deployments löschen (das aktive bleibt immer) |
35
+ | `boot-config …` | Start-Config für den Caddy-Manager-Container erzeugen |
36
+ | `import-legacy <ordner>` | Sites aus dem Datenordner des Altsystems übernehmen |
37
+
38
+ ## Beispiel: Deploy aus GitHub Actions
39
+
40
+ ```yaml
41
+ - name: Deploy
42
+ env:
43
+ CM_URL: ${{ vars.CM_URL }}
44
+ CM_USER: ci
45
+ CM_PASSWORD: ${{ secrets.CM_PASSWORD }}
46
+ run: npx -y @openinc/caddy-manager-cli deploy meine-site ./dist --branch ${{ github.ref_name }} --keep 10
47
+ ```
48
+
49
+ Die Verwaltung muss vom Runner aus erreichbar sein.
50
+
51
+ ## Lizenz
52
+
53
+ MIT, siehe [LICENSE](LICENSE). Hinweise zu gebündelten Drittanbieter-Paketen: [`dist/THIRD_PARTY_LICENSES.md`](dist/THIRD_PARTY_LICENSES.md).