@arcforge/types 2.0.158 → 2.0.159
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/package.json +1 -1
- package/src/deploy.ts +33 -0
package/package.json
CHANGED
package/src/deploy.ts
CHANGED
|
@@ -8,6 +8,39 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export type DeployTarget = "axon" | "self"
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* The base image version — one source of truth for everything that names it.
|
|
13
|
+
*
|
|
14
|
+
* Three things need this string and they must never disagree: the provisioner
|
|
15
|
+
* stamps it onto each deployed service's image tag, the bundler writes it into
|
|
16
|
+
* a self-host Dockerfile, and the image's deploy script tags what it pushes.
|
|
17
|
+
*
|
|
18
|
+
* It used to live in the backend, with `packages/docker/deploy.ts` keeping a
|
|
19
|
+
* copy in sync by REGEX REWRITE across two files. That is a sync that fails
|
|
20
|
+
* silently: a refactor renames the constant, the regex stops matching, and the
|
|
21
|
+
* two drift with nothing failing until a deployment runs an unexpected runtime.
|
|
22
|
+
*
|
|
23
|
+
* Here rather than in `@axon/docker` because the BUNDLER needs it, and
|
|
24
|
+
* `@axon/docker` depends on `@arcforge/platform` — importing it back would be
|
|
25
|
+
* a cycle. Types is the package everything already depends on and which
|
|
26
|
+
* depends on nothing.
|
|
27
|
+
*/
|
|
28
|
+
export const AXON_BASE_VERSION = "0.3.6"
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Where the base image is pulled from.
|
|
32
|
+
*
|
|
33
|
+
* PUBLIC, deliberately: a user self-hosting an agent runs this image directly
|
|
34
|
+
* (`docker run -v $PWD:/agent axon/base:<version>`), so an image they cannot
|
|
35
|
+
* pull makes self-hosting impossible rather than merely awkward.
|
|
36
|
+
*/
|
|
37
|
+
export const AXON_BASE_IMAGE = "axon/base"
|
|
38
|
+
|
|
39
|
+
/** The reference a Dockerfile or `docker run` should use. Pinned, never floating. */
|
|
40
|
+
export function axonBaseRef(version: string = AXON_BASE_VERSION): string {
|
|
41
|
+
return `${AXON_BASE_IMAGE}:${version}`
|
|
42
|
+
}
|
|
43
|
+
|
|
11
44
|
/** Autoscaling bounds for managed deployments. */
|
|
12
45
|
export type ScalingConfig = {
|
|
13
46
|
/** Minimum running instances. Defaults to `0`, allowing scale-to-zero. */
|