dokku-compose 0.6.10 → 0.6.12

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
@@ -176,7 +176,7 @@ apps:
176
176
 
177
177
  ### Docker Options
178
178
 
179
- Add custom Docker options per build phase (`build`, `deploy`, `run`). Each phase is cleared and re-populated on every `up` for idempotent convergence.
179
+ Add custom Docker options per build phase (`build`, `deploy`, `run`). Options are converged with targeted add/remove only changed options are modified, preserving entries managed by other resources (e.g. `--link`, `--build-arg`).
180
180
 
181
181
  ```yaml
182
182
  apps:
@@ -411,8 +411,10 @@ dokku-compose down --force # Destroy all configured apps
411
411
  |--------|-------------|
412
412
  | `--file <path>` | Config file (default: `dokku-compose.yml`) |
413
413
  | `--dry-run` | Print commands without executing |
414
+ | `--sensitive` | Show sensitive values in output (masked by default) |
414
415
  | `--fail-fast` | Stop on first error (default: continue to next app) |
415
416
  | `--remove-orphans` | Destroy services and networks not in config |
417
+ | `--verbose` | Show git-style +/- diff (diff command only) |
416
418
  | `--help` | Show usage |
417
419
  | `--version` | Show version |
418
420
 
@@ -429,14 +431,14 @@ dokku-compose ps # Show status
429
431
  ## Execution Modes
430
432
 
431
433
  ```bash
432
- # Run locally on the Dokku server
433
- dokku-compose up
434
-
435
- # Run remotely over SSH
434
+ # Run remotely over SSH (recommended)
436
435
  DOKKU_HOST=my-server.example.com dokku-compose up
436
+
437
+ # Run on the Dokku server itself (use DOKKU_HOST=localhost for best compatibility)
438
+ DOKKU_HOST=localhost dokku-compose up
437
439
  ```
438
440
 
439
- When `DOKKU_HOST` is set, all Dokku commands are sent over SSH. This is the typical workflowkeep `dokku-compose.yml` in your project repo and apply it from your local machine. SSH key access to the Dokku server is required.
441
+ When `DOKKU_HOST` is set, all Dokku commands are sent over SSH. This is the recommended modeit works both remotely from your local machine and directly on the server. SSH mode avoids compatibility issues with Dokku's basher environment that can affect some commands when called directly from Node.js. SSH key access to the Dokku server is required.
440
442
 
441
443
  ## What `up` Does
442
444
 
package/dist/index.js CHANGED
@@ -721,8 +721,34 @@ var Networks = {
721
721
  };
722
722
  var NetworkProps = {
723
723
  key: "network",
724
- forceApply: true,
725
- read: async () => ({}),
724
+ read: async (ctx, target) => {
725
+ const raw = await ctx.query("network:report", target);
726
+ const report = parseReport(raw, "network");
727
+ const config = {};
728
+ if (report["attach-post-create"]) {
729
+ config.attach_post_create = report["attach-post-create"].split(/\s+/);
730
+ }
731
+ if (report["initial-network"]) config.initial_network = report["initial-network"];
732
+ if (report["bind-all-interfaces"] === "true") config.bind_all_interfaces = true;
733
+ if (report["tld"]) config.tld = report["tld"];
734
+ return config;
735
+ },
736
+ readAll: async (ctx) => {
737
+ const raw = await ctx.query("network:report");
738
+ const bulk = parseBulkReport(raw, "network");
739
+ const result = /* @__PURE__ */ new Map();
740
+ for (const [app, report] of bulk) {
741
+ const config = {};
742
+ if (report["attach-post-create"]) {
743
+ config.attach_post_create = report["attach-post-create"].split(/\s+/);
744
+ }
745
+ if (report["initial-network"]) config.initial_network = report["initial-network"];
746
+ if (report["bind-all-interfaces"] === "true") config.bind_all_interfaces = true;
747
+ if (report["tld"]) config.tld = report["tld"];
748
+ result.set(app, config);
749
+ }
750
+ return result;
751
+ },
726
752
  onChange: async (ctx, target, { after }) => {
727
753
  if (after.attach_post_create !== void 0 && after.attach_post_create !== false) {
728
754
  const nets = Array.isArray(after.attach_post_create) ? after.attach_post_create : [after.attach_post_create];
@@ -1317,13 +1343,14 @@ ${result.errors.length} error(s), ${result.warnings.length} warning(s)`);
1317
1343
  console.log("Valid.");
1318
1344
  }
1319
1345
  });
1320
- program.command("export").description("Export server state to dokku-compose.yml format").option("--app <app>", "Export only a specific app").option("-o, --output <path>", "Write to file instead of stdout").action(async (opts) => {
1346
+ program.command("export").description("Export server state to dokku-compose.yml format").option("--app <app>", "Export only a specific app").option("-o, --output <path>", "Write to file instead of stdout").option("--sensitive", "Show sensitive values (masked by default)").action(async (opts) => {
1321
1347
  const runner = makeRunner({});
1322
1348
  const ctx = createContext(runner);
1323
1349
  try {
1324
- const result = await runExport(ctx, {
1350
+ const rawResult = await runExport(ctx, {
1325
1351
  appFilter: opts.app ? [opts.app] : void 0
1326
1352
  });
1353
+ const result = opts.sensitive ? rawResult : maskSensitiveData(rawResult);
1327
1354
  const out = yaml3.dump(result, { lineWidth: 120 });
1328
1355
  if (opts.output) {
1329
1356
  fs3.writeFileSync(opts.output, out);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dokku-compose",
3
- "version": "0.6.10",
3
+ "version": "0.6.12",
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",