@rcpooley/concord 0.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 +21 -0
- package/README.md +318 -0
- package/bin/concord.service +69 -0
- package/dist/age.d.ts +20 -0
- package/dist/age.d.ts.map +1 -0
- package/dist/age.js +58 -0
- package/dist/age.js.map +1 -0
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +301 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/daemon.d.ts +4 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +394 -0
- package/dist/daemon.js.map +1 -0
- package/dist/eval-config.d.ts +2 -0
- package/dist/eval-config.d.ts.map +1 -0
- package/dist/eval-config.js +45 -0
- package/dist/eval-config.js.map +1 -0
- package/dist/exec.d.ts +168 -0
- package/dist/exec.d.ts.map +1 -0
- package/dist/exec.js +313 -0
- package/dist/exec.js.map +1 -0
- package/dist/git.d.ts +59 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +265 -0
- package/dist/git.js.map +1 -0
- package/dist/hook.d.ts +37 -0
- package/dist/hook.d.ts.map +1 -0
- package/dist/hook.js +89 -0
- package/dist/hook.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/init.d.ts +76 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/init.js +236 -0
- package/dist/init.js.map +1 -0
- package/dist/loader.d.ts +35 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/loader.js +230 -0
- package/dist/loader.js.map +1 -0
- package/dist/module.d.ts +116 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +100 -0
- package/dist/module.js.map +1 -0
- package/dist/modules/apt/index.d.ts +45 -0
- package/dist/modules/apt/index.d.ts.map +1 -0
- package/dist/modules/apt/index.js +249 -0
- package/dist/modules/apt/index.js.map +1 -0
- package/dist/modules/apt/schema.d.ts +63 -0
- package/dist/modules/apt/schema.d.ts.map +1 -0
- package/dist/modules/apt/schema.js +75 -0
- package/dist/modules/apt/schema.js.map +1 -0
- package/dist/modules/checkout/index.d.ts +88 -0
- package/dist/modules/checkout/index.d.ts.map +1 -0
- package/dist/modules/checkout/index.js +382 -0
- package/dist/modules/checkout/index.js.map +1 -0
- package/dist/modules/checkout/schema.d.ts +52 -0
- package/dist/modules/checkout/schema.d.ts.map +1 -0
- package/dist/modules/checkout/schema.js +132 -0
- package/dist/modules/checkout/schema.js.map +1 -0
- package/dist/modules/cloudflare/api.d.ts +64 -0
- package/dist/modules/cloudflare/api.d.ts.map +1 -0
- package/dist/modules/cloudflare/api.js +98 -0
- package/dist/modules/cloudflare/api.js.map +1 -0
- package/dist/modules/cloudflare/index.d.ts +74 -0
- package/dist/modules/cloudflare/index.d.ts.map +1 -0
- package/dist/modules/cloudflare/index.js +374 -0
- package/dist/modules/cloudflare/index.js.map +1 -0
- package/dist/modules/cloudflare/schema.d.ts +62 -0
- package/dist/modules/cloudflare/schema.d.ts.map +1 -0
- package/dist/modules/cloudflare/schema.js +85 -0
- package/dist/modules/cloudflare/schema.js.map +1 -0
- package/dist/modules/docker/index.d.ts +83 -0
- package/dist/modules/docker/index.d.ts.map +1 -0
- package/dist/modules/docker/index.js +470 -0
- package/dist/modules/docker/index.js.map +1 -0
- package/dist/modules/docker/registry.d.ts +35 -0
- package/dist/modules/docker/registry.d.ts.map +1 -0
- package/dist/modules/docker/registry.js +95 -0
- package/dist/modules/docker/registry.js.map +1 -0
- package/dist/modules/docker/render.d.ts +45 -0
- package/dist/modules/docker/render.d.ts.map +1 -0
- package/dist/modules/docker/render.js +162 -0
- package/dist/modules/docker/render.js.map +1 -0
- package/dist/modules/docker/schema.d.ts +231 -0
- package/dist/modules/docker/schema.d.ts.map +1 -0
- package/dist/modules/docker/schema.js +335 -0
- package/dist/modules/docker/schema.js.map +1 -0
- package/dist/modules/docker/sweeper.d.ts +64 -0
- package/dist/modules/docker/sweeper.d.ts.map +1 -0
- package/dist/modules/docker/sweeper.js +94 -0
- package/dist/modules/docker/sweeper.js.map +1 -0
- package/dist/modules/file/index.d.ts +79 -0
- package/dist/modules/file/index.d.ts.map +1 -0
- package/dist/modules/file/index.js +305 -0
- package/dist/modules/file/index.js.map +1 -0
- package/dist/modules/file/schema.d.ts +45 -0
- package/dist/modules/file/schema.d.ts.map +1 -0
- package/dist/modules/file/schema.js +114 -0
- package/dist/modules/file/schema.js.map +1 -0
- package/dist/modules/index.d.ts +20 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/index.js +11 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/porkbun/api.d.ts +36 -0
- package/dist/modules/porkbun/api.d.ts.map +1 -0
- package/dist/modules/porkbun/api.js +62 -0
- package/dist/modules/porkbun/api.js.map +1 -0
- package/dist/modules/porkbun/index.d.ts +50 -0
- package/dist/modules/porkbun/index.d.ts.map +1 -0
- package/dist/modules/porkbun/index.js +236 -0
- package/dist/modules/porkbun/index.js.map +1 -0
- package/dist/modules/porkbun/schema.d.ts +38 -0
- package/dist/modules/porkbun/schema.d.ts.map +1 -0
- package/dist/modules/porkbun/schema.js +39 -0
- package/dist/modules/porkbun/schema.js.map +1 -0
- package/dist/modules/script/index.d.ts +43 -0
- package/dist/modules/script/index.d.ts.map +1 -0
- package/dist/modules/script/index.js +116 -0
- package/dist/modules/script/index.js.map +1 -0
- package/dist/modules/script/schema.d.ts +25 -0
- package/dist/modules/script/schema.d.ts.map +1 -0
- package/dist/modules/script/schema.js +63 -0
- package/dist/modules/script/schema.js.map +1 -0
- package/dist/modules/systemd/index.d.ts +93 -0
- package/dist/modules/systemd/index.d.ts.map +1 -0
- package/dist/modules/systemd/index.js +394 -0
- package/dist/modules/systemd/index.js.map +1 -0
- package/dist/modules/systemd/render.d.ts +41 -0
- package/dist/modules/systemd/render.d.ts.map +1 -0
- package/dist/modules/systemd/render.js +252 -0
- package/dist/modules/systemd/render.js.map +1 -0
- package/dist/modules/systemd/schema.d.ts +293 -0
- package/dist/modules/systemd/schema.d.ts.map +1 -0
- package/dist/modules/systemd/schema.js +302 -0
- package/dist/modules/systemd/schema.js.map +1 -0
- package/dist/modules/systemd/sweeper.d.ts +31 -0
- package/dist/modules/systemd/sweeper.d.ts.map +1 -0
- package/dist/modules/systemd/sweeper.js +77 -0
- package/dist/modules/systemd/sweeper.js.map +1 -0
- package/dist/plans.d.ts +132 -0
- package/dist/plans.d.ts.map +1 -0
- package/dist/plans.js +315 -0
- package/dist/plans.js.map +1 -0
- package/dist/records.d.ts +37 -0
- package/dist/records.d.ts.map +1 -0
- package/dist/records.js +100 -0
- package/dist/records.js.map +1 -0
- package/dist/registry.d.ts +38 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +31 -0
- package/dist/registry.js.map +1 -0
- package/dist/runner.d.ts +48 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +150 -0
- package/dist/runner.js.map +1 -0
- package/dist/scheduler.d.ts +36 -0
- package/dist/scheduler.d.ts.map +1 -0
- package/dist/scheduler.js +77 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/schema.d.ts +762 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +185 -0
- package/dist/schema.js.map +1 -0
- package/dist/secret.d.ts +24 -0
- package/dist/secret.d.ts.map +1 -0
- package/dist/secret.js +3 -0
- package/dist/secret.js.map +1 -0
- package/dist/ui.d.ts +62 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +288 -0
- package/dist/ui.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type ContainerEntry } from './schema.js';
|
|
2
|
+
/**
|
|
3
|
+
* An app declaration → an ordinary compose project.
|
|
4
|
+
*
|
|
5
|
+
* Emitted as JSON rather than YAML on purpose. Compose parses JSON (YAML is a
|
|
6
|
+
* superset), which means no hand-rolled emitter, no quoting rules to get wrong,
|
|
7
|
+
* and byte-identical output for identical input for free. Byte-determinism is
|
|
8
|
+
* load-bearing: the hash of this document is what `read()` compares against the
|
|
9
|
+
* label on the running container, so any instability would replan forever.
|
|
10
|
+
*/
|
|
11
|
+
/** The single service in every rendered project. */
|
|
12
|
+
export declare const SERVICE = "app";
|
|
13
|
+
export declare const LABEL_APP = "dev.concord.app";
|
|
14
|
+
/**
|
|
15
|
+
* What the container is running: a git commit for a built app, a registry
|
|
16
|
+
* digest for an image app. Named `version` rather than `commit` because those
|
|
17
|
+
* are genuinely two kinds of the same thing, and a label called `commit`
|
|
18
|
+
* holding a digest is the sort of small dishonesty that costs an hour later.
|
|
19
|
+
*/
|
|
20
|
+
export declare const LABEL_VERSION = "dev.concord.version";
|
|
21
|
+
export declare const LABEL_SPEC = "dev.concord.spec";
|
|
22
|
+
export declare const imageTag: (name: string, commit: string) => string;
|
|
23
|
+
/**
|
|
24
|
+
* What the compose file's `image:` says.
|
|
25
|
+
*
|
|
26
|
+
* A built app runs a locally-tagged image; an image app runs the upstream one
|
|
27
|
+
* pinned BY DIGEST — never by the tag it was resolved from, or the pin would be
|
|
28
|
+
* decorative.
|
|
29
|
+
*/
|
|
30
|
+
export declare const imageRef: (app: ContainerEntry, version: string) => string;
|
|
31
|
+
export interface RenderedContainer {
|
|
32
|
+
/** The compose document, ready to be written as `docker-compose.yml`. */
|
|
33
|
+
compose: Record<string, unknown>;
|
|
34
|
+
/** sha256 over the document with the spec label absent — see below. */
|
|
35
|
+
specHash: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @param env Fully resolved environment — `secretEnv` already decrypted. Kept
|
|
39
|
+
* as a parameter rather than read inside so that rendering stays
|
|
40
|
+
* pure and testable without a secret resolver.
|
|
41
|
+
*/
|
|
42
|
+
export declare function render(app: ContainerEntry, version: string, env: Record<string, string>): RenderedContainer;
|
|
43
|
+
/** The exact bytes written to the target. Pretty-printed for a readable diff. */
|
|
44
|
+
export declare const serialize: (compose: Record<string, unknown>) => string;
|
|
45
|
+
//# sourceMappingURL=render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/modules/docker/render.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAEhE;;;;;;;;GAQG;AAEH,oDAAoD;AACpD,eAAO,MAAM,OAAO,QAAQ,CAAA;AAE5B,eAAO,MAAM,SAAS,oBAAoB,CAAA;AAC1C;;;;;GAKG;AACH,eAAO,MAAM,aAAa,wBAAwB,CAAA;AAClD,eAAO,MAAM,UAAU,qBAAqB,CAAA;AAE5C,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,WAAgC,CAAA;AAErF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,cAAc,EAAE,SAAS,MAAM,KAAG,MAC4B,CAAA;AAM5F,MAAM,WAAW,iBAAiB;IAChC,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,iBAAiB,CA4G3G;AA0BD,iFAAiF;AACjF,eAAO,MAAM,SAAS,GAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,MACpB,CAAA"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { isImageSource } from './schema.js';
|
|
3
|
+
/**
|
|
4
|
+
* An app declaration → an ordinary compose project.
|
|
5
|
+
*
|
|
6
|
+
* Emitted as JSON rather than YAML on purpose. Compose parses JSON (YAML is a
|
|
7
|
+
* superset), which means no hand-rolled emitter, no quoting rules to get wrong,
|
|
8
|
+
* and byte-identical output for identical input for free. Byte-determinism is
|
|
9
|
+
* load-bearing: the hash of this document is what `read()` compares against the
|
|
10
|
+
* label on the running container, so any instability would replan forever.
|
|
11
|
+
*/
|
|
12
|
+
/** The single service in every rendered project. */
|
|
13
|
+
export const SERVICE = 'app';
|
|
14
|
+
export const LABEL_APP = 'dev.concord.app';
|
|
15
|
+
/**
|
|
16
|
+
* What the container is running: a git commit for a built app, a registry
|
|
17
|
+
* digest for an image app. Named `version` rather than `commit` because those
|
|
18
|
+
* are genuinely two kinds of the same thing, and a label called `commit`
|
|
19
|
+
* holding a digest is the sort of small dishonesty that costs an hour later.
|
|
20
|
+
*/
|
|
21
|
+
export const LABEL_VERSION = 'dev.concord.version';
|
|
22
|
+
export const LABEL_SPEC = 'dev.concord.spec';
|
|
23
|
+
export const imageTag = (name, commit) => `concord/${name}:${commit}`;
|
|
24
|
+
/**
|
|
25
|
+
* What the compose file's `image:` says.
|
|
26
|
+
*
|
|
27
|
+
* A built app runs a locally-tagged image; an image app runs the upstream one
|
|
28
|
+
* pinned BY DIGEST — never by the tag it was resolved from, or the pin would be
|
|
29
|
+
* decorative.
|
|
30
|
+
*/
|
|
31
|
+
export const imageRef = (app, version) => isImageSource(app.source) ? `${app.source.image}@${version}` : imageTag(app.name, version);
|
|
32
|
+
/** Records are emitted key-sorted; everything else keeps its declared order. */
|
|
33
|
+
const sorted = (r) => Object.fromEntries(Object.entries(r).sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)));
|
|
34
|
+
/**
|
|
35
|
+
* @param env Fully resolved environment — `secretEnv` already decrypted. Kept
|
|
36
|
+
* as a parameter rather than read inside so that rendering stays
|
|
37
|
+
* pure and testable without a secret resolver.
|
|
38
|
+
*/
|
|
39
|
+
export function render(app, version, env) {
|
|
40
|
+
const service = {
|
|
41
|
+
image: imageRef(app, version),
|
|
42
|
+
restart: app.restart,
|
|
43
|
+
};
|
|
44
|
+
if (app.containerName !== undefined)
|
|
45
|
+
service['container_name'] = app.containerName;
|
|
46
|
+
if (app.command !== undefined)
|
|
47
|
+
service['command'] = app.command;
|
|
48
|
+
if (app.user !== undefined)
|
|
49
|
+
service['user'] = app.user;
|
|
50
|
+
if (app.networkMode !== undefined)
|
|
51
|
+
service['network_mode'] = app.networkMode;
|
|
52
|
+
if (app.privileged)
|
|
53
|
+
service['privileged'] = true;
|
|
54
|
+
if (Object.keys(env).length) {
|
|
55
|
+
// Inline mapping, never `env_file`: dotenv parsing applies its own quoting
|
|
56
|
+
// and escaping rules, and a referenced env_file is also what made
|
|
57
|
+
// `compose config --hash` unusable. Values still pass through Compose's
|
|
58
|
+
// `$` interpolation, which `literal()` below escapes.
|
|
59
|
+
service['environment'] = sorted(env);
|
|
60
|
+
}
|
|
61
|
+
if (app.ports?.length) {
|
|
62
|
+
service['ports'] = app.ports.map((p) => ({
|
|
63
|
+
target: p.container,
|
|
64
|
+
published: String(p.host),
|
|
65
|
+
protocol: p.protocol,
|
|
66
|
+
...(p.bind ? { host_ip: p.bind } : {}),
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
if (app.volumes?.length) {
|
|
70
|
+
service['volumes'] = app.volumes.map((v) => v.name !== undefined
|
|
71
|
+
? {
|
|
72
|
+
type: 'volume',
|
|
73
|
+
source: v.name,
|
|
74
|
+
target: v.mountPath,
|
|
75
|
+
...(v.readOnly ? { read_only: true } : {}),
|
|
76
|
+
}
|
|
77
|
+
: {
|
|
78
|
+
type: 'bind',
|
|
79
|
+
source: v.hostPath,
|
|
80
|
+
target: v.mountPath,
|
|
81
|
+
...(v.readOnly ? { read_only: true } : {}),
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
if (app.networks?.length) {
|
|
85
|
+
service['networks'] = Object.fromEntries(app.networks.map((n) => [n.name, n.aliases?.length ? { aliases: [...n.aliases] } : null]));
|
|
86
|
+
}
|
|
87
|
+
if (app.healthcheck) {
|
|
88
|
+
service['healthcheck'] = {
|
|
89
|
+
test: ['CMD-SHELL', app.healthcheck.test],
|
|
90
|
+
interval: app.healthcheck.interval,
|
|
91
|
+
timeout: app.healthcheck.timeout,
|
|
92
|
+
retries: app.healthcheck.retries,
|
|
93
|
+
start_period: app.healthcheck.startPeriod,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
if (app.memory !== undefined)
|
|
97
|
+
service['mem_limit'] = app.memory;
|
|
98
|
+
if (app.cpus !== undefined)
|
|
99
|
+
service['cpus'] = app.cpus;
|
|
100
|
+
// User labels first, so a config can never overwrite the identity labels —
|
|
101
|
+
// schema also rejects `dev.concord.*`, and both together mean a stale
|
|
102
|
+
// container cannot be dressed up to look converged.
|
|
103
|
+
service['labels'] = {
|
|
104
|
+
...sorted(app.labels ?? {}),
|
|
105
|
+
[LABEL_APP]: app.name,
|
|
106
|
+
[LABEL_VERSION]: version,
|
|
107
|
+
};
|
|
108
|
+
let compose = {
|
|
109
|
+
name: app.name,
|
|
110
|
+
services: { [SERVICE]: service },
|
|
111
|
+
};
|
|
112
|
+
if (app.networks?.length) {
|
|
113
|
+
// Always external. Creating a network here would turn a typo into a new
|
|
114
|
+
// empty network that silently isolates the app from everything else.
|
|
115
|
+
compose['networks'] = Object.fromEntries(app.networks.map((n) => [n.name, { external: true }]));
|
|
116
|
+
}
|
|
117
|
+
const named = app.volumes?.filter((v) => v.name !== undefined) ?? [];
|
|
118
|
+
if (named.length) {
|
|
119
|
+
// `external: true` means the EXACT name, with no project prefix. Compose
|
|
120
|
+
// would otherwise create `<project>_<name>`, which on a migration silently
|
|
121
|
+
// starts the app with an empty disk beside its real data. Apply creates
|
|
122
|
+
// these volumes itself, so external does not mean "someone else's problem".
|
|
123
|
+
compose['volumes'] = Object.fromEntries(named.map((v) => [v.name, { external: true }]));
|
|
124
|
+
}
|
|
125
|
+
compose = literal(compose);
|
|
126
|
+
// The hash covers the document WITHOUT the spec label, because the label
|
|
127
|
+
// carries the hash — including it would be circular. It is taken over the
|
|
128
|
+
// escaped document, the bytes actually written, so a spec with no `$` in it
|
|
129
|
+
// hashes exactly as it did before escaping existed.
|
|
130
|
+
const specHash = createHash('sha256').update(JSON.stringify(compose)).digest('hex').slice(0, 16);
|
|
131
|
+
const services = compose['services'];
|
|
132
|
+
services[SERVICE]['labels'][LABEL_SPEC] = specHash;
|
|
133
|
+
return { compose, specHash };
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Escape every string VALUE so Compose passes it through verbatim.
|
|
137
|
+
*
|
|
138
|
+
* Compose interpolates `$VAR` and `${VAR}` in every string value of the file —
|
|
139
|
+
* environment, command, labels, healthcheck, all of it — from the environment
|
|
140
|
+
* `docker compose` runs in and any `.env` beside the file, and `up` has no flag
|
|
141
|
+
* to turn that off. A declared `a$b` reached the container as `a`. `$$` is
|
|
142
|
+
* Compose's escape for a literal `$`, so after this a `$` in the config is a `$`
|
|
143
|
+
* in the container: a healthcheck's `$POSTGRES_USER` reaches the container's
|
|
144
|
+
* shell rather than being blanked by Compose first.
|
|
145
|
+
*
|
|
146
|
+
* Keys are left alone because Compose does not interpolate keys. The callback
|
|
147
|
+
* replacement is deliberate: a replacement STRING of `'$$'` would itself be read
|
|
148
|
+
* as a pattern and insert a single `$`.
|
|
149
|
+
*/
|
|
150
|
+
function literal(v) {
|
|
151
|
+
if (typeof v === 'string')
|
|
152
|
+
return v.replace(/\$/g, () => '$$');
|
|
153
|
+
if (Array.isArray(v))
|
|
154
|
+
return v.map(literal);
|
|
155
|
+
if (v !== null && typeof v === 'object') {
|
|
156
|
+
return Object.fromEntries(Object.entries(v).map(([k, x]) => [k, literal(x)]));
|
|
157
|
+
}
|
|
158
|
+
return v;
|
|
159
|
+
}
|
|
160
|
+
/** The exact bytes written to the target. Pretty-printed for a readable diff. */
|
|
161
|
+
export const serialize = (compose) => JSON.stringify(compose, null, 2) + '\n';
|
|
162
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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AO,CAAC,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/E,CAAC;IACD,OAAO,CAAC,CAAA;AACV,CAAC;AAED,iFAAiF;AACjF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAgC,EAAU,EAAE,CACpE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAA"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GitSourceSchema: z.ZodObject<{
|
|
3
|
+
repo: z.ZodString;
|
|
4
|
+
track: z.ZodOptional<z.ZodObject<{
|
|
5
|
+
branch: z.ZodString;
|
|
6
|
+
}, z.core.$strict>>;
|
|
7
|
+
pin: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
commit: z.ZodString;
|
|
9
|
+
}, z.core.$strict>>;
|
|
10
|
+
context: z.ZodDefault<z.ZodString>;
|
|
11
|
+
dockerfile: z.ZodDefault<z.ZodString>;
|
|
12
|
+
buildArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
|
+
buildTimeout: z.ZodDefault<z.ZodNumber>;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
/**
|
|
16
|
+
* A prebuilt image, rather than a repo to build.
|
|
17
|
+
*
|
|
18
|
+
* `track` resolves the tag to a DIGEST on every run, and the digest is what
|
|
19
|
+
* gets rendered. A bare tag would be the `latest` + `pull: missing` trap all
|
|
20
|
+
* over again: the spec would never change, so the app would sit frozen on
|
|
21
|
+
* whatever the host first downloaded while looking like it tracked upstream.
|
|
22
|
+
*/
|
|
23
|
+
export declare const ImageSourceSchema: z.ZodObject<{
|
|
24
|
+
image: z.ZodString;
|
|
25
|
+
track: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
tag: z.ZodString;
|
|
27
|
+
}, z.core.$strict>>;
|
|
28
|
+
pin: z.ZodOptional<z.ZodObject<{
|
|
29
|
+
digest: z.ZodString;
|
|
30
|
+
}, z.core.$strict>>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
/** Exactly one kind. `repo` builds; `image` runs something already built. */
|
|
33
|
+
export declare const ContainerSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
34
|
+
repo: z.ZodString;
|
|
35
|
+
track: z.ZodOptional<z.ZodObject<{
|
|
36
|
+
branch: z.ZodString;
|
|
37
|
+
}, z.core.$strict>>;
|
|
38
|
+
pin: z.ZodOptional<z.ZodObject<{
|
|
39
|
+
commit: z.ZodString;
|
|
40
|
+
}, z.core.$strict>>;
|
|
41
|
+
context: z.ZodDefault<z.ZodString>;
|
|
42
|
+
dockerfile: z.ZodDefault<z.ZodString>;
|
|
43
|
+
buildArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
44
|
+
buildTimeout: z.ZodDefault<z.ZodNumber>;
|
|
45
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
46
|
+
image: z.ZodString;
|
|
47
|
+
track: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
tag: z.ZodString;
|
|
49
|
+
}, z.core.$strict>>;
|
|
50
|
+
pin: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
digest: z.ZodString;
|
|
52
|
+
}, z.core.$strict>>;
|
|
53
|
+
}, z.core.$strict>]>;
|
|
54
|
+
export declare const isImageSource: (s: z.output<typeof ContainerSourceSchema>) => s is z.output<typeof ImageSourceSchema>;
|
|
55
|
+
/**
|
|
56
|
+
* A docker network as a managed resource.
|
|
57
|
+
*
|
|
58
|
+
* Deliberately thin. `driver` is the only knob most fleets need, and a field nothing sets is a field nobody maintains — the subnet,
|
|
59
|
+
* gateway and IPAM options are all reachable later if something asks for them.
|
|
60
|
+
*/
|
|
61
|
+
export declare const DockerNetworkSchema: z.ZodObject<{
|
|
62
|
+
name: z.ZodString;
|
|
63
|
+
driver: z.ZodDefault<z.ZodEnum<{
|
|
64
|
+
host: "host";
|
|
65
|
+
none: "none";
|
|
66
|
+
bridge: "bridge";
|
|
67
|
+
overlay: "overlay";
|
|
68
|
+
macvlan: "macvlan";
|
|
69
|
+
}>>;
|
|
70
|
+
}, z.core.$strict>;
|
|
71
|
+
export declare const ContainerSchema: z.ZodObject<{
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
74
|
+
repo: z.ZodString;
|
|
75
|
+
track: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
branch: z.ZodString;
|
|
77
|
+
}, z.core.$strict>>;
|
|
78
|
+
pin: z.ZodOptional<z.ZodObject<{
|
|
79
|
+
commit: z.ZodString;
|
|
80
|
+
}, z.core.$strict>>;
|
|
81
|
+
context: z.ZodDefault<z.ZodString>;
|
|
82
|
+
dockerfile: z.ZodDefault<z.ZodString>;
|
|
83
|
+
buildArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
84
|
+
buildTimeout: z.ZodDefault<z.ZodNumber>;
|
|
85
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
86
|
+
image: z.ZodString;
|
|
87
|
+
track: z.ZodOptional<z.ZodObject<{
|
|
88
|
+
tag: z.ZodString;
|
|
89
|
+
}, z.core.$strict>>;
|
|
90
|
+
pin: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
digest: z.ZodString;
|
|
92
|
+
}, z.core.$strict>>;
|
|
93
|
+
}, z.core.$strict>]>;
|
|
94
|
+
failureIsWarning: z.ZodDefault<z.ZodBoolean>;
|
|
95
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
96
|
+
secretEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<import("../../secret.js").Secret, import("../../secret.js").Secret>>>;
|
|
97
|
+
ports: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
98
|
+
host: z.ZodNumber;
|
|
99
|
+
container: z.ZodNumber;
|
|
100
|
+
protocol: z.ZodDefault<z.ZodEnum<{
|
|
101
|
+
tcp: "tcp";
|
|
102
|
+
udp: "udp";
|
|
103
|
+
}>>;
|
|
104
|
+
bind: z.ZodOptional<z.ZodString>;
|
|
105
|
+
}, z.core.$strict>>>;
|
|
106
|
+
networks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
107
|
+
name: z.ZodString;
|
|
108
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
|
+
external: z.ZodDefault<z.ZodLiteral<true>>;
|
|
110
|
+
}, z.core.$strict>>>;
|
|
111
|
+
networkMode: z.ZodOptional<z.ZodLiteral<"host">>;
|
|
112
|
+
privileged: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
+
containerName: z.ZodOptional<z.ZodString>;
|
|
114
|
+
volumes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
115
|
+
name: z.ZodOptional<z.ZodString>;
|
|
116
|
+
hostPath: z.ZodOptional<z.ZodString>;
|
|
117
|
+
mountPath: z.ZodString;
|
|
118
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
}, z.core.$strict>>>;
|
|
120
|
+
healthcheck: z.ZodOptional<z.ZodObject<{
|
|
121
|
+
test: z.ZodString;
|
|
122
|
+
interval: z.ZodDefault<z.ZodString>;
|
|
123
|
+
timeout: z.ZodDefault<z.ZodString>;
|
|
124
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
125
|
+
startPeriod: z.ZodDefault<z.ZodString>;
|
|
126
|
+
}, z.core.$strict>>;
|
|
127
|
+
restart: z.ZodDefault<z.ZodEnum<{
|
|
128
|
+
no: "no";
|
|
129
|
+
always: "always";
|
|
130
|
+
"on-failure": "on-failure";
|
|
131
|
+
"unless-stopped": "unless-stopped";
|
|
132
|
+
}>>;
|
|
133
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
134
|
+
cpus: z.ZodOptional<z.ZodString>;
|
|
135
|
+
user: z.ZodOptional<z.ZodString>;
|
|
136
|
+
command: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
137
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
138
|
+
}, z.core.$strict>;
|
|
139
|
+
/** Where rendered compose projects live unless a module overrides `root`. The
|
|
140
|
+
* sweeper cleans orphaned project dirs under THIS path only — a custom-root
|
|
141
|
+
* module's orphans would be missed, exactly as under the v6 declared sweep. */
|
|
142
|
+
export declare const DEFAULT_ROOT = "/data/concord/apps";
|
|
143
|
+
export declare const DockerConfigSchema: z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<"docker">;
|
|
145
|
+
id: z.ZodString;
|
|
146
|
+
host: z.ZodString;
|
|
147
|
+
root: z.ZodDefault<z.ZodString>;
|
|
148
|
+
keepImages: z.ZodDefault<z.ZodNumber>;
|
|
149
|
+
networks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
150
|
+
name: z.ZodString;
|
|
151
|
+
driver: z.ZodDefault<z.ZodEnum<{
|
|
152
|
+
host: "host";
|
|
153
|
+
none: "none";
|
|
154
|
+
bridge: "bridge";
|
|
155
|
+
overlay: "overlay";
|
|
156
|
+
macvlan: "macvlan";
|
|
157
|
+
}>>;
|
|
158
|
+
}, z.core.$strict>>>;
|
|
159
|
+
containers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
160
|
+
name: z.ZodString;
|
|
161
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
162
|
+
repo: z.ZodString;
|
|
163
|
+
track: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
branch: z.ZodString;
|
|
165
|
+
}, z.core.$strict>>;
|
|
166
|
+
pin: z.ZodOptional<z.ZodObject<{
|
|
167
|
+
commit: z.ZodString;
|
|
168
|
+
}, z.core.$strict>>;
|
|
169
|
+
context: z.ZodDefault<z.ZodString>;
|
|
170
|
+
dockerfile: z.ZodDefault<z.ZodString>;
|
|
171
|
+
buildArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
172
|
+
buildTimeout: z.ZodDefault<z.ZodNumber>;
|
|
173
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
174
|
+
image: z.ZodString;
|
|
175
|
+
track: z.ZodOptional<z.ZodObject<{
|
|
176
|
+
tag: z.ZodString;
|
|
177
|
+
}, z.core.$strict>>;
|
|
178
|
+
pin: z.ZodOptional<z.ZodObject<{
|
|
179
|
+
digest: z.ZodString;
|
|
180
|
+
}, z.core.$strict>>;
|
|
181
|
+
}, z.core.$strict>]>;
|
|
182
|
+
failureIsWarning: z.ZodDefault<z.ZodBoolean>;
|
|
183
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
184
|
+
secretEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<import("../../secret.js").Secret, import("../../secret.js").Secret>>>;
|
|
185
|
+
ports: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
186
|
+
host: z.ZodNumber;
|
|
187
|
+
container: z.ZodNumber;
|
|
188
|
+
protocol: z.ZodDefault<z.ZodEnum<{
|
|
189
|
+
tcp: "tcp";
|
|
190
|
+
udp: "udp";
|
|
191
|
+
}>>;
|
|
192
|
+
bind: z.ZodOptional<z.ZodString>;
|
|
193
|
+
}, z.core.$strict>>>;
|
|
194
|
+
networks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
195
|
+
name: z.ZodString;
|
|
196
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
197
|
+
external: z.ZodDefault<z.ZodLiteral<true>>;
|
|
198
|
+
}, z.core.$strict>>>;
|
|
199
|
+
networkMode: z.ZodOptional<z.ZodLiteral<"host">>;
|
|
200
|
+
privileged: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
+
containerName: z.ZodOptional<z.ZodString>;
|
|
202
|
+
volumes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
203
|
+
name: z.ZodOptional<z.ZodString>;
|
|
204
|
+
hostPath: z.ZodOptional<z.ZodString>;
|
|
205
|
+
mountPath: z.ZodString;
|
|
206
|
+
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
207
|
+
}, z.core.$strict>>>;
|
|
208
|
+
healthcheck: z.ZodOptional<z.ZodObject<{
|
|
209
|
+
test: z.ZodString;
|
|
210
|
+
interval: z.ZodDefault<z.ZodString>;
|
|
211
|
+
timeout: z.ZodDefault<z.ZodString>;
|
|
212
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
213
|
+
startPeriod: z.ZodDefault<z.ZodString>;
|
|
214
|
+
}, z.core.$strict>>;
|
|
215
|
+
restart: z.ZodDefault<z.ZodEnum<{
|
|
216
|
+
no: "no";
|
|
217
|
+
always: "always";
|
|
218
|
+
"on-failure": "on-failure";
|
|
219
|
+
"unless-stopped": "unless-stopped";
|
|
220
|
+
}>>;
|
|
221
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
222
|
+
cpus: z.ZodOptional<z.ZodString>;
|
|
223
|
+
user: z.ZodOptional<z.ZodString>;
|
|
224
|
+
command: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
225
|
+
labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
226
|
+
}, z.core.$strict>>>;
|
|
227
|
+
}, z.core.$strict>;
|
|
228
|
+
export type ContainerSourceConfig = z.output<typeof ContainerSourceSchema>;
|
|
229
|
+
export type ContainerEntry = z.output<typeof ContainerSchema>;
|
|
230
|
+
export type DockerConfig = z.output<typeof DockerConfigSchema>;
|
|
231
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/modules/docker/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAgCvB,eAAO,MAAM,eAAe;;;;;;;;;;;;kBAiDxB,CAAA;AAIJ;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;kBAyB1B,CAAA;AAEJ,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;oBAEhC,CAAA;AAEF,eAAO,MAAM,aAAa,GACxB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,KACxC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAiB,CAAA;AAuC1D;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;kBAMrB,CAAA;AAoCX,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuHxB,CAAA;AAEJ;;gFAEgF;AAChF,eAAO,MAAM,YAAY,uBAAuB,CAAA;AAQhD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmCpB,CAAA;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAC1E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAA;AAC7D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
|