@rakay-technology/kraft 0.7.9 → 0.7.13
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/dist/bare-5S7IYNHZ.js +27 -0
- package/dist/{chunk-VFPLICBX.js → chunk-3AZY56JP.js} +107 -32
- package/dist/{chunk-IGTODKUA.js → chunk-5RWL7EFH.js} +5 -5
- package/dist/{chunk-ZQJU5CTZ.js → chunk-7VMXN646.js} +1 -1
- package/dist/{chunk-DJNKEVZ7.js → chunk-AADWLI2S.js} +1 -1
- package/dist/{chunk-MOSINQAM.js → chunk-AFUXAAFQ.js} +16 -388
- package/dist/{chunk-2UQFOUSZ.js → chunk-B2CUYCGY.js} +49 -16
- package/dist/{chunk-7O6MARHJ.js → chunk-B6B42QMZ.js} +9 -9
- package/dist/{chunk-HFOE2IXZ.js → chunk-BIOW6K3V.js} +1 -1
- package/dist/{chunk-YY5DEAZI.js → chunk-BQMBJ32I.js} +2 -2
- package/dist/{chunk-ULEEWX5M.js → chunk-C3LRTROB.js} +39 -8
- package/dist/{chunk-DFVWR6JM.js → chunk-C74WJ3U4.js} +2 -2
- package/dist/{chunk-K24SBFI2.js → chunk-D2IM25JV.js} +1 -1
- package/dist/{chunk-MC4X55BW.js → chunk-DNC4A3MZ.js} +3 -3
- package/dist/{chunk-3RCXJZJD.js → chunk-E3J47WO3.js} +1 -1
- package/dist/chunk-G4VGNFGV.js +27374 -0
- package/dist/{chunk-JK7KKBXI.js → chunk-KHAT3OZP.js} +4 -4
- package/dist/{chunk-7UKBMDUF.js → chunk-MK6GYBO4.js} +9 -9
- package/dist/{chunk-SPKRI7MF.js → chunk-N7AJ2D4I.js} +96 -12
- package/dist/{chunk-ZNVAHQRY.js → chunk-Q7FAE2MB.js} +6 -6
- package/dist/{chunk-2Y62WP2D.js → chunk-QCGVPIYN.js} +2 -2
- package/dist/{chunk-PCOTSRS4.js → chunk-QLPQ5NFE.js} +3 -3
- package/dist/{chunk-DI54Y66N.js → chunk-QPUEAYB3.js} +3 -3
- package/dist/{chunk-XBGSR22I.js → chunk-XAEYWDBX.js} +53 -9
- package/dist/{chunk-HLF5PMKE.js → chunk-Y2MET6MX.js} +1 -1
- package/dist/{chunk-BN23UUSF.js → chunk-YXXWTBXB.js} +1 -1
- package/dist/{detect-N4HFQZ6Y.js → detect-NDVA2MAF.js} +4 -4
- package/dist/{docker-DU7JA2AK.js → docker-Z2ILAC7A.js} +8 -8
- package/dist/{docker-edge-executor-MPIPQHNF.js → docker-edge-executor-JID2Q2HZ.js} +7 -7
- package/dist/{edge-import-RZD7MMOE.js → edge-import-WRU5JQ43.js} +22 -22
- package/dist/{edge-preflight-6YO27PPQ.js → edge-preflight-6FYNGFIH.js} +13 -13
- package/dist/{ensure-container-edge-ZKEKC47H.js → ensure-container-edge-VFCVCXW3.js} +11 -11
- package/dist/{executor-ZWF2J7GS.js → executor-LNKX5OMQ.js} +6 -6
- package/dist/{host-channel-preflight-Z64G3NIM.js → host-channel-preflight-V7Q6GPXE.js} +22 -22
- package/dist/index.js +40 -40
- package/dist/{local-executor-W3O5HDLM.js → local-executor-NPLQMF6A.js} +3 -3
- package/dist/{nginx-XLDZIG4E.js → nginx-V6DQWKON.js} +11 -9
- package/dist/{openresty-lua-ZNE6IBYU.js → openresty-lua-OECMHHON.js} +21 -7
- package/dist/{privilege-IMARWVU2.js → privilege-KI56M7OQ.js} +5 -5
- package/dist/server/index.js +1897 -58664
- package/dist/{setup-Q6GGIJ4Q.js → setup-A2LJ4IWU.js} +12 -12
- package/dist/{ssh-client-LOCZTEUC.js → ssh-client-NRBHQJVZ.js} +2 -2
- package/dist/{up-TU7622HW.js → up-XHQK2O2M.js} +25 -25
- package/package.json +1 -1
- package/dist/bare-JM3EX7S4.js +0 -27
- package/dist/chunk-ND23EK7Y.js +0 -81645
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-3CJLKL6E.js";
|
|
10
10
|
import {
|
|
11
11
|
sq
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YXXWTBXB.js";
|
|
13
13
|
import {
|
|
14
14
|
assessHostSupport,
|
|
15
15
|
classifyDistro,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
parseSystemArch,
|
|
18
18
|
parseSystemOs,
|
|
19
19
|
safeErrorMessage
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-G4VGNFGV.js";
|
|
21
21
|
|
|
22
22
|
// ../../packages/adapters/src/system/elevated-executor.ts
|
|
23
23
|
import { randomBytes } from "crypto";
|
|
@@ -10,28 +10,28 @@ import {
|
|
|
10
10
|
readComposeEnvFile,
|
|
11
11
|
resolveLocalEnvironmentSync,
|
|
12
12
|
thisHost
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-B2CUYCGY.js";
|
|
14
14
|
import {
|
|
15
15
|
OS_DIR
|
|
16
16
|
} from "./chunk-5GPXMTE4.js";
|
|
17
17
|
import {
|
|
18
18
|
systemCatalog
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AFUXAAFQ.js";
|
|
20
20
|
import {
|
|
21
21
|
invalidateEdgeContainer,
|
|
22
22
|
sanitizeEdgeVhosts
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-QLPQ5NFE.js";
|
|
24
24
|
import {
|
|
25
25
|
DEFAULT_DOCKER_SOCKET_PATH,
|
|
26
26
|
resolveLocalDockerSocketPath
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-Q7FAE2MB.js";
|
|
28
28
|
import {
|
|
29
29
|
LocalExecutor
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-BIOW6K3V.js";
|
|
31
31
|
import {
|
|
32
32
|
EDGE_CONTAINER_MOUNTS,
|
|
33
33
|
EDGE_HOST_STATE_DIR
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-XAEYWDBX.js";
|
|
35
35
|
import {
|
|
36
36
|
DEFAULT_IMAGE_REGISTRY,
|
|
37
37
|
HOST_CHANNEL_BLOCKED,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
hostFirewallRule,
|
|
52
52
|
hostFirewallRuleRemoval,
|
|
53
53
|
wrapText
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-G4VGNFGV.js";
|
|
55
55
|
|
|
56
56
|
// src/lib/host-channel-preflight.ts
|
|
57
57
|
import { spawnSync as spawnSync4 } from "child_process";
|
|
@@ -648,10 +648,15 @@ async function ensureDocker(opts = {}) {
|
|
|
648
648
|
return false;
|
|
649
649
|
}
|
|
650
650
|
var COMPOSE_YAML = `# Managed by \`kraft up\` \u2014 do not edit; re-run \`kraft up\` to regenerate.
|
|
651
|
+
# Prod hygiene: log rotation on every service, memory bounds, healthchecks incl.
|
|
652
|
+
# dashboard + edge (mgmt /health \u2014 the :80/:443 catch-alls 404 by design).
|
|
651
653
|
services:
|
|
652
654
|
postgres:
|
|
653
655
|
image: postgres:16-alpine
|
|
654
656
|
restart: unless-stopped
|
|
657
|
+
logging: { driver: json-file, options: { max-size: "10m", max-file: "3" } }
|
|
658
|
+
mem_limit: 1g
|
|
659
|
+
mem_reservation: 256m
|
|
655
660
|
environment:
|
|
656
661
|
# Keep the data dir in a subdirectory of the volume so a fresh install never
|
|
657
662
|
# runs initdb against a bare mount root (which fails on quirky host
|
|
@@ -673,6 +678,9 @@ services:
|
|
|
673
678
|
redis:
|
|
674
679
|
image: redis:7-alpine
|
|
675
680
|
restart: unless-stopped
|
|
681
|
+
logging: { driver: json-file, options: { max-size: "10m", max-file: "3" } }
|
|
682
|
+
mem_limit: 512m
|
|
683
|
+
mem_reservation: 128m
|
|
676
684
|
command: ["redis-server", "--appendonly", "yes"]
|
|
677
685
|
expose: ["6379"]
|
|
678
686
|
volumes: [redis_data:/data]
|
|
@@ -685,6 +693,9 @@ services:
|
|
|
685
693
|
api:
|
|
686
694
|
image: \${KRAFT_IMAGE_REGISTRY:-ghcr.io/rakay-technology}/kraft-api:\${KRAFT_VERSION:-latest}
|
|
687
695
|
restart: unless-stopped
|
|
696
|
+
logging: { driver: json-file, options: { max-size: "10m", max-file: "3" } }
|
|
697
|
+
mem_limit: 1g
|
|
698
|
+
mem_reservation: 256m
|
|
688
699
|
# Loopback by default \u2014 the host-net edge reaches it over loopback, so nothing
|
|
689
700
|
# sits on a public interface. KRAFT_BIND_ADDR opts into a public/LAN interface
|
|
690
701
|
# (set by \`kraft up\` when a public URL is configured for off-box access).
|
|
@@ -744,6 +755,9 @@ ${edgeVolumeYaml(" ")}
|
|
|
744
755
|
dashboard:
|
|
745
756
|
image: \${KRAFT_IMAGE_REGISTRY:-ghcr.io/rakay-technology}/kraft-dashboard:\${KRAFT_VERSION:-latest}
|
|
746
757
|
restart: unless-stopped
|
|
758
|
+
logging: { driver: json-file, options: { max-size: "10m", max-file: "3" } }
|
|
759
|
+
mem_limit: 512m
|
|
760
|
+
mem_reservation: 128m
|
|
747
761
|
# Loopback by default (see api note); KRAFT_BIND_ADDR opts into a public interface.
|
|
748
762
|
ports: ["\${KRAFT_BIND_ADDR:-127.0.0.1}:\${DASHBOARD_PORT:-3001}:\${DASHBOARD_PORT:-3001}"]
|
|
749
763
|
env_file: [.env]
|
|
@@ -753,6 +767,12 @@ ${edgeVolumeYaml(" ")}
|
|
|
753
767
|
INTERNAL_API_URL: http://api:\${API_PORT:-4000}
|
|
754
768
|
depends_on:
|
|
755
769
|
api: { condition: service_healthy }
|
|
770
|
+
healthcheck:
|
|
771
|
+
test: ["CMD-SHELL", "node -e \\"fetch('http://127.0.0.1:\${DASHBOARD_PORT:-3001}/').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\\""]
|
|
772
|
+
interval: 15s
|
|
773
|
+
timeout: 5s
|
|
774
|
+
retries: 12
|
|
775
|
+
start_period: 60s
|
|
756
776
|
|
|
757
777
|
edge:
|
|
758
778
|
image: \${KRAFT_IMAGE_REGISTRY:-ghcr.io/rakay-technology}/kraft-edge:\${KRAFT_VERSION:-latest}
|
|
@@ -766,8 +786,19 @@ ${edgeVolumeYaml(" ")}
|
|
|
766
786
|
container_name: kraft-edge
|
|
767
787
|
restart: unless-stopped
|
|
768
788
|
network_mode: host
|
|
789
|
+
logging: { driver: json-file, options: { max-size: "10m", max-file: "3" } }
|
|
790
|
+
mem_limit: 512m
|
|
791
|
+
mem_reservation: 64m
|
|
769
792
|
volumes:
|
|
770
793
|
${edgeVolumeYaml(" ")}
|
|
794
|
+
# Continuous edge liveness: mgmt /health answers "ok" on loopback (the
|
|
795
|
+
# :80/:443 catch-alls 404 by design, so never probe those with curl -f).
|
|
796
|
+
healthcheck:
|
|
797
|
+
test: ["CMD-SHELL", "curl -f http://127.0.0.1:9145/health || exit 1"]
|
|
798
|
+
interval: 15s
|
|
799
|
+
timeout: 5s
|
|
800
|
+
retries: 3
|
|
801
|
+
start_period: 20s
|
|
771
802
|
|
|
772
803
|
volumes:
|
|
773
804
|
postgres_data:
|
|
@@ -1776,7 +1807,7 @@ function operatorEnvPassthrough(managed, prev) {
|
|
|
1776
1807
|
}
|
|
1777
1808
|
var PRESERVED_ENV_HEADER = "# Preserved from your existing .env \u2014 set by you, not by `kraft up` (#485).";
|
|
1778
1809
|
function resolveImageVersion(opts) {
|
|
1779
|
-
return opts.version?.trim() || process.env.KRAFT_VERSION?.trim() || (true ? "0.7.
|
|
1810
|
+
return opts.version?.trim() || process.env.KRAFT_VERSION?.trim() || (true ? "0.7.13" : "latest");
|
|
1780
1811
|
}
|
|
1781
1812
|
function managedEnvLines(opts, host, cfg, prev) {
|
|
1782
1813
|
const lines = [
|
|
@@ -4,14 +4,14 @@ import { createRequire as __ospCreateRequire } from "node:module";
|
|
|
4
4
|
const require = __ospCreateRequire(import.meta.url);
|
|
5
5
|
import {
|
|
6
6
|
sq
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YXXWTBXB.js";
|
|
8
8
|
import {
|
|
9
9
|
nodeBinDirs,
|
|
10
10
|
nodeBinPathExport,
|
|
11
11
|
packageManagerEnsureCommand,
|
|
12
12
|
safeErrorMessage,
|
|
13
13
|
shellQuote
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-G4VGNFGV.js";
|
|
15
15
|
|
|
16
16
|
// ../../packages/adapters/src/runtime/git-clone.ts
|
|
17
17
|
var sq2 = shellQuote;
|
|
@@ -4,7 +4,7 @@ import { createRequire as __ospCreateRequire } from "node:module";
|
|
|
4
4
|
const require = __ospCreateRequire(import.meta.url);
|
|
5
5
|
import {
|
|
6
6
|
PACKAGE_ROOT_ONLY_EXCLUDES
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-G4VGNFGV.js";
|
|
8
8
|
|
|
9
9
|
// ../../packages/adapters/src/archive.ts
|
|
10
10
|
import { execFile } from "child_process";
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
} from "./chunk-I3DPMTSF.js";
|
|
9
9
|
import {
|
|
10
10
|
edgeFailureReason
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QLPQ5NFE.js";
|
|
12
12
|
import {
|
|
13
13
|
LocalExecutor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BIOW6K3V.js";
|
|
15
15
|
import {
|
|
16
16
|
logEntry,
|
|
17
17
|
sq
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YXXWTBXB.js";
|
|
19
19
|
|
|
20
20
|
// ../../packages/adapters/src/system/docker-edge-executor.ts
|
|
21
21
|
import Dockerode from "dockerode";
|