dokku-compose 0.9.3 → 0.10.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 +1 -0
- package/dist/index.js +21 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,6 +124,7 @@ All features are idempotent — running `up` twice produces no changes.
|
|
|
124
124
|
| Zero-Downtime Checks | Configure deploy checks, disable per process type | [checks](docs/reference/checks.md) |
|
|
125
125
|
| Log Management | Log retention and vector sink configuration | [logs](docs/reference/logs.md) |
|
|
126
126
|
| Plugins | Install Dokku plugins declaratively | [plugins](docs/reference/plugins.md) |
|
|
127
|
+
| Docker Auth | Authenticate the host docker daemon to private registries (e.g. ghcr.io) for `git:from-image` flows | [docker_auth](docs/reference/docker_auth.md) |
|
|
127
128
|
| Postgres | Postgres services with optional S3 backups | [postgres](docs/reference/postgres.md) |
|
|
128
129
|
| Redis | Redis service instances | [redis](docs/reference/redis.md) |
|
|
129
130
|
| Service Links | Link postgres/redis services to apps | [plugins](docs/reference/plugins.md#linking-services-to-apps-appsapplinks) |
|
package/dist/index.js
CHANGED
|
@@ -92,11 +92,16 @@ var PluginSchema = z.object({
|
|
|
92
92
|
url: z.string().url(),
|
|
93
93
|
version: z.string().optional()
|
|
94
94
|
});
|
|
95
|
+
var DockerAuthEntrySchema = z.object({
|
|
96
|
+
username: z.string().min(1),
|
|
97
|
+
password: z.string().min(1)
|
|
98
|
+
});
|
|
95
99
|
var ConfigSchema = z.object({
|
|
96
100
|
dokku: z.object({
|
|
97
101
|
version: z.string().optional()
|
|
98
102
|
}).optional(),
|
|
99
103
|
plugins: z.record(z.string(), PluginSchema).optional(),
|
|
104
|
+
docker_auth: z.record(z.string(), DockerAuthEntrySchema).optional(),
|
|
100
105
|
networks: z.array(z.string()).optional(),
|
|
101
106
|
postgres: z.record(z.string(), PostgresSchema).optional(),
|
|
102
107
|
redis: z.record(z.string(), RedisSchema).optional(),
|
|
@@ -805,6 +810,15 @@ async function ensurePlugins(ctx, plugins) {
|
|
|
805
810
|
}
|
|
806
811
|
}
|
|
807
812
|
|
|
813
|
+
// src/modules/docker-auth.ts
|
|
814
|
+
async function ensureDockerAuth(ctx, config) {
|
|
815
|
+
for (const [server, creds] of Object.entries(config)) {
|
|
816
|
+
logAction("docker-auth", `Logging in to ${server} as ${creds.username}`);
|
|
817
|
+
await ctx.run("registry:login", server, creds.username, creds.password);
|
|
818
|
+
logDone();
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
808
822
|
// src/modules/network.ts
|
|
809
823
|
async function ensureNetworks(ctx, networks) {
|
|
810
824
|
for (const net of networks) {
|
|
@@ -1081,6 +1095,7 @@ async function ensureGlobalNginx(ctx, nginx) {
|
|
|
1081
1095
|
async function runUp(ctx, config, appFilter) {
|
|
1082
1096
|
const apps = appFilter.length > 0 ? appFilter : Object.keys(config.apps);
|
|
1083
1097
|
if (config.plugins) await ensurePlugins(ctx, config.plugins);
|
|
1098
|
+
if (config.docker_auth) await ensureDockerAuth(ctx, config.docker_auth);
|
|
1084
1099
|
if (config.domains !== void 0) await ensureGlobalDomains(ctx, config.domains);
|
|
1085
1100
|
if (config.env !== void 0) await ensureGlobalConfig(ctx, config.env);
|
|
1086
1101
|
if (config.logs !== void 0) await ensureGlobalLogs(ctx, config.logs);
|
|
@@ -1240,9 +1255,14 @@ function maskValue(value) {
|
|
|
1240
1255
|
return `****${value.slice(-4)}`;
|
|
1241
1256
|
}
|
|
1242
1257
|
function maskSensitiveArgs(cmd) {
|
|
1243
|
-
|
|
1258
|
+
let masked = cmd.replace(/([^\s=]*(?:TOKEN|SECRET|PASSWORD|KEY|AUTH|CREDENTIAL)[^\s=]*)=(\S+)/gi, (_, key, value) => {
|
|
1244
1259
|
return `${key}=${maskValue(value)}`;
|
|
1245
1260
|
});
|
|
1261
|
+
masked = masked.replace(
|
|
1262
|
+
/^(registry:login\s+\S+\s+\S+\s+)(\S+)/,
|
|
1263
|
+
(_, prefix, password) => `${prefix}${maskValue(password)}`
|
|
1264
|
+
);
|
|
1265
|
+
return masked;
|
|
1246
1266
|
}
|
|
1247
1267
|
function maskSensitiveData(data) {
|
|
1248
1268
|
if (data === null || data === void 0) return data;
|