dokku-compose 0.8.0 → 0.9.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/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # dokku-compose
2
2
 
3
- - 📄 **Declarative** -- Define your entire Dokku server in a single YAML file
3
+ - 📄 **Declarative** -- One YAML file for your entire Dokku server. Git-trackable, reviewable, reproducible
4
4
  - 🔁 **Idempotent** -- Run it twice, nothing changes. Safe to re-run anytime
5
5
  - 👀 **Dry-run** -- Preview every command before it touches your server
6
6
  - 🔍 **Diff** -- See exactly what's out of sync before applying changes
7
- - 🏗️ **Modular** -- One file per Dokku namespace. Easy to read, extend, and debug
7
+ - 📤 **Export** -- Reverse-engineer an existing server into a config file
8
8
 
9
9
  [![Tests](https://github.com/guess/dokku-compose/actions/workflows/tests.yml/badge.svg)](https://github.com/guess/dokku-compose/actions/workflows/tests.yml)
10
10
  [![License: MIT](https://img.shields.io/github/license/guess/dokku-compose)](LICENSE)
@@ -16,11 +16,13 @@
16
16
 
17
17
  ## Why
18
18
 
19
- Dokku is a battle-tested, single-server PaaS — and one of the best platforms for self-hosting. But configuring it means running dozens of imperative commands in the right order. Miss one and your deploy breaks. Change servers and you're starting over.
19
+ [Dokku](https://dokku.com) is a battle-tested, single-server PaaS — and one of the best platforms for self-hosting. But configuring it means running dozens of imperative commands in the right order. Miss one and your deploy breaks. Change servers and you're starting over.
20
20
 
21
- AI agents can generate and deploy code better than ever, but they can't reason about infrastructure that lives as a sequence of shell commands. There's no file to diff, no history to track, no way to review changes in a PR.
21
+ AI agents can generate and deploy code better than ever, but infrastructure as shell history can't be diffed, reviewed, or reproduced.
22
22
 
23
- `dokku-compose` makes Dokku declarative. One YAML file. Git-trackable. AI-friendly. Like Docker Compose, but for Dokku.
23
+ `dokku-compose` makes Dokku declarative. One YAML file. Git-trackable. Agent-friendly.
24
+
25
+ Like Docker Compose, but for Dokku.
24
26
 
25
27
  ## Quick Start
26
28
 
package/dist/index.js CHANGED
@@ -871,6 +871,13 @@ async function destroyPostgres(ctx, services) {
871
871
  logDone();
872
872
  }
873
873
  }
874
+ function parseBackupSchedule(cronLine) {
875
+ const parts = cronLine.trim().split(/\s+/);
876
+ if (parts.length < 8) return null;
877
+ const schedule = parts.slice(0, 5).join(" ");
878
+ const bucket = parts[parts.length - 1];
879
+ return { schedule, bucket };
880
+ }
874
881
  async function exportPostgres(ctx) {
875
882
  const services = {};
876
883
  const listOutput = await ctx.query("postgres:list");
@@ -892,6 +899,26 @@ async function exportPostgres(ctx) {
892
899
  } else {
893
900
  config.version = versionField;
894
901
  }
902
+ try {
903
+ const cronOutput = await ctx.query("postgres:backup-schedule-cat", name);
904
+ if (cronOutput) {
905
+ const parsed = parseBackupSchedule(cronOutput);
906
+ if (parsed) {
907
+ config.backup = {
908
+ schedule: parsed.schedule,
909
+ bucket: parsed.bucket,
910
+ auth: {
911
+ access_key_id: "REPLACE_ME",
912
+ secret_access_key: "REPLACE_ME",
913
+ region: "REPLACE_ME",
914
+ signature_version: "REPLACE_ME",
915
+ endpoint: "REPLACE_ME"
916
+ }
917
+ };
918
+ }
919
+ }
920
+ } catch {
921
+ }
895
922
  services[name] = config;
896
923
  }
897
924
  return services;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dokku-compose",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Docker Compose for Dokku — declare your entire server in a single YAML file.",
5
5
  "main": "dist/index.js",
6
6
  "exports": "./dist/index.js",