@wtfalch/foundry 0.36.0 → 0.36.1
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.
|
@@ -34,10 +34,16 @@ export declare const DIGESTS: PinnedVersions;
|
|
|
34
34
|
*/
|
|
35
35
|
export declare function pinnedRef(key: keyof PinnedVersions): string;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
37
|
+
* The two image fields Coolify accepts. Its tag rule has no `@` or `:`, so a
|
|
38
|
+
* digest goes in the name as `<image>@sha256` and the tag holds the bare
|
|
39
|
+
* 64-hex digest (Coolify pulls `<name>:<tag>`). A declared tag that equals the
|
|
40
|
+
* pinned one gets its digest; any other declared tag (an override) is passed
|
|
41
|
+
* through unchanged.
|
|
39
42
|
*/
|
|
40
|
-
export declare function
|
|
43
|
+
export declare function coolifyImageFor(key: keyof PinnedVersions, image: string, tag: string): {
|
|
44
|
+
docker_registry_image_name: string;
|
|
45
|
+
docker_registry_image_tag: string;
|
|
46
|
+
};
|
|
41
47
|
/**
|
|
42
48
|
* Why an image tag cannot be used, or `null`. #248: generalised out of what
|
|
43
49
|
* was `platform-providers.ts`'s `mailImageTagBlocked`, the one guard
|
|
@@ -41,11 +41,20 @@ export function pinnedRef(key) {
|
|
|
41
41
|
return `${VERSIONS[key]}@${DIGESTS[key]}`;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
44
|
+
* The two image fields Coolify accepts. Its tag rule has no `@` or `:`, so a
|
|
45
|
+
* digest goes in the name as `<image>@sha256` and the tag holds the bare
|
|
46
|
+
* 64-hex digest (Coolify pulls `<name>:<tag>`). A declared tag that equals the
|
|
47
|
+
* pinned one gets its digest; any other declared tag (an override) is passed
|
|
48
|
+
* through unchanged.
|
|
46
49
|
*/
|
|
47
|
-
export function
|
|
48
|
-
|
|
50
|
+
export function coolifyImageFor(key, image, tag) {
|
|
51
|
+
if (tag !== VERSIONS[key]) {
|
|
52
|
+
return { docker_registry_image_name: image, docker_registry_image_tag: tag };
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
docker_registry_image_name: `${image}@sha256`,
|
|
56
|
+
docker_registry_image_tag: DIGESTS[key].replace(/^sha256:/, ''),
|
|
57
|
+
};
|
|
49
58
|
}
|
|
50
59
|
/**
|
|
51
60
|
* Tag spellings that resolve to whatever the registry currently has, not a
|
package/dist/plan/executor.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
2
|
import { randomBytes, randomUUID } from 'node:crypto';
|
|
3
3
|
import { URL } from 'node:url';
|
|
4
|
-
import {
|
|
4
|
+
import { coolifyImageFor } from '../bootstrap/versions.js';
|
|
5
5
|
import { redactSecrets } from '../calls-sfu-deploy-support.js';
|
|
6
6
|
import { resolveCallsSfuUrls } from '../calls-sfu.js';
|
|
7
7
|
import { APP_ENTRY_KEY, appEntry, filesCollectionEnvName, ownerMailboxRecorded, ownerMailboxes, ownsServices, sharedSecretRef, } from '../org.js';
|
|
@@ -3870,8 +3870,7 @@ export class FoundryStepExecutor {
|
|
|
3870
3870
|
server_uuid: server.uuid,
|
|
3871
3871
|
environment_name: environment.name,
|
|
3872
3872
|
environment_uuid: environment.uuid,
|
|
3873
|
-
|
|
3874
|
-
docker_registry_image_tag: pinnedTagFor('synapse', synapseTag),
|
|
3873
|
+
...coolifyImageFor('synapse', SYNAPSE_IMAGE, synapseTag),
|
|
3875
3874
|
ports_exposes: '8008',
|
|
3876
3875
|
name: names.synapse,
|
|
3877
3876
|
description: `Synapse for ${org.slug}'s calls stack (${SYNAPSE_IMAGE}:${synapseTag})`,
|
package/dist/plan/own-sfu.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { coolifyImageFor } from '../bootstrap/versions.js';
|
|
2
2
|
import { mintLivekitCredentials } from '../calls-sfu-keys.js';
|
|
3
3
|
import { LIVEKIT_SIGNALLING_PORT, sfuSlotPorts } from '../calls-sfu.js';
|
|
4
4
|
import { ensureCloudflaredConnector } from './cloudflared-connector.js';
|
|
@@ -105,8 +105,7 @@ export async function provisionSfuApp(scope, deps, target, input) {
|
|
|
105
105
|
server_uuid: server.uuid,
|
|
106
106
|
environment_name: environment.name,
|
|
107
107
|
environment_uuid: environment.uuid,
|
|
108
|
-
|
|
109
|
-
docker_registry_image_tag: pinnedTagFor('livekit', input.version),
|
|
108
|
+
...coolifyImageFor('livekit', OWN_SFU_IMAGE, input.version),
|
|
110
109
|
ports_exposes: String(LIVEKIT_SIGNALLING_PORT),
|
|
111
110
|
ports_mappings: sfuPortsMappings(input.slot),
|
|
112
111
|
name: target.names.sfuApp,
|
|
@@ -122,7 +121,7 @@ export async function provisionSfuApp(scope, deps, target, input) {
|
|
|
122
121
|
// Set on every run: a declared version or slot reaches an existing app here.
|
|
123
122
|
await coolify.updateApplication(appId, {
|
|
124
123
|
custom_internal_name: target.internal.sfu,
|
|
125
|
-
|
|
124
|
+
...coolifyImageFor('livekit', OWN_SFU_IMAGE, input.version),
|
|
126
125
|
ports_exposes: String(LIVEKIT_SIGNALLING_PORT),
|
|
127
126
|
ports_mappings: sfuPortsMappings(input.slot),
|
|
128
127
|
...healthCheckSettings('/', LIVEKIT_SIGNALLING_PORT),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash, createPrivateKey, generateKeyPairSync, randomBytes, randomUUID, sign, } from 'node:crypto';
|
|
2
2
|
import { isIPv4 } from 'node:net';
|
|
3
3
|
import { applyObjects, openInstance, platformMailSettingsObjects } from '@wtfalch/email/postmaster';
|
|
4
|
-
import { VERSIONS, floatingTagBlocked, pinnedRef
|
|
4
|
+
import { VERSIONS, coolifyImageFor, floatingTagBlocked, pinnedRef } from '../bootstrap/versions.js';
|
|
5
5
|
import { redactSecrets } from '../calls-sfu-deploy-support.js';
|
|
6
6
|
import { ownerMailboxes } from '../org.js';
|
|
7
7
|
import { BOULE_BRIDGE_SECRET_ENV, BOULE_PEER_PASSWORD_ENV, BOULE_PEER_ROLE, bouleHostnameFor, } from './boule.js';
|
|
@@ -2539,8 +2539,7 @@ export async function provisionMailServer(scope, deps, target, input) {
|
|
|
2539
2539
|
server_uuid: server.uuid,
|
|
2540
2540
|
environment_name: environment.name,
|
|
2541
2541
|
environment_uuid: environment.uuid,
|
|
2542
|
-
|
|
2543
|
-
docker_registry_image_tag: pinnedTagFor('stalwart', imageTag),
|
|
2542
|
+
...coolifyImageFor('stalwart', STALWART_IMAGE, imageTag),
|
|
2544
2543
|
ports_exposes: STALWART_PORTS_EXPOSES,
|
|
2545
2544
|
...(hostPorts ? { ports_mappings: hostPorts } : {}),
|
|
2546
2545
|
name: target.names.mailApp,
|
|
@@ -2560,7 +2559,7 @@ export async function provisionMailServer(scope, deps, target, input) {
|
|
|
2560
2559
|
// `'ready'` probe below. Stalwart's own readiness route and HTTP port.
|
|
2561
2560
|
await deps.coolify.updateApplication(appId, {
|
|
2562
2561
|
custom_internal_name: target.internal.mail,
|
|
2563
|
-
|
|
2562
|
+
...coolifyImageFor('stalwart', STALWART_IMAGE, imageTag),
|
|
2564
2563
|
...healthCheckSettings(STALWART_READY_PATH, Number(STALWART_HTTP_PORT)),
|
|
2565
2564
|
// Only a platform that uses the shared relay, or one that did, changes a published port.
|
|
2566
2565
|
...(portsChanged ? { ports_mappings: hostPorts } : {}),
|
|
@@ -7263,8 +7262,7 @@ async function provisionPlatformHc(context, deps) {
|
|
|
7263
7262
|
server_uuid: server.uuid,
|
|
7264
7263
|
environment_name: environment.name,
|
|
7265
7264
|
environment_uuid: environment.uuid,
|
|
7266
|
-
|
|
7267
|
-
docker_registry_image_tag: pinnedTagFor('hc', gitRef),
|
|
7265
|
+
...coolifyImageFor('hc', HC_IMAGE, gitRef),
|
|
7268
7266
|
ports_exposes: HC_PORT,
|
|
7269
7267
|
name: PLATFORM_HC_APP_NAME,
|
|
7270
7268
|
description: `Healthchecks for the platform's own heartbeats (#540, ${HC_IMAGE}:${gitRef})`,
|
|
@@ -7277,7 +7275,7 @@ async function provisionPlatformHc(context, deps) {
|
|
|
7277
7275
|
// own rule. The image tag too, so a declared release change reaches the app.
|
|
7278
7276
|
await deps.coolify.updateApplication(appId, {
|
|
7279
7277
|
custom_internal_name: HC_INTERNAL_NAME,
|
|
7280
|
-
|
|
7278
|
+
...coolifyImageFor('hc', HC_IMAGE, gitRef),
|
|
7281
7279
|
...healthCheckSettings(HC_HEALTH_CHECK_PATH, Number(HC_PORT)),
|
|
7282
7280
|
});
|
|
7283
7281
|
// ---- env, parsed off the database's own owner credentials -----------------
|