openship 0.4.8 → 0.5.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/{bare-JY5Y5ELU.js → bare-VRGE5MXH.js} +7 -7
- package/dist/{chunk-TGIINPVM.js → chunk-6LKHXB6T.js} +22 -7
- package/dist/{chunk-2D3I5G6P.js → chunk-6PIYRG5I.js} +23 -3
- package/dist/{chunk-BBHX7T4R.js → chunk-BS2AXYZX.js} +401 -76
- package/dist/{chunk-SJIFLLX4.js → chunk-CUJXGK7R.js} +321 -85
- package/dist/{chunk-VFINNTUL.js → chunk-EAAGSQXN.js} +23 -8
- package/dist/{chunk-4Z5QO7N6.js → chunk-I6PSTQIR.js} +2 -2
- package/dist/{chunk-5NYUCONN.js → chunk-JLKKYUZA.js} +31 -49
- package/dist/{chunk-XPPZ7B2J.js → chunk-K2RPVGPN.js} +2 -2
- package/dist/{chunk-MZ2WEHHY.js → chunk-KNTJ7PSF.js} +1 -1
- package/dist/{chunk-L2VOGB2X.js → chunk-KZOBYJUW.js} +1 -1
- package/dist/{chunk-GKHUSZCD.js → chunk-NNPEG6HM.js} +1 -1
- package/dist/{chunk-SLTYVHU7.js → chunk-NXFIRK2Z.js} +381 -72
- package/dist/{chunk-FXTBHTWY.js → chunk-RB35YN3J.js} +271 -35
- package/dist/{chunk-6APULWSU.js → chunk-UMQP7SYT.js} +429 -66
- package/dist/{chunk-V6AN6XLZ.js → chunk-V7BZMGOT.js} +123 -45
- package/dist/{chunk-VDMQJHPI.js → chunk-YWMODKWL.js} +67 -4
- package/dist/{chunk-OXWDY22G.js → chunk-ZCOQJCZO.js} +1 -1
- package/dist/{cloud-KYWY3RP4.js → cloud-3M2WZ624.js} +12 -12
- package/dist/{detect-AZLOHUFX.js → detect-BAJMY6KM.js} +3 -3
- package/dist/{docker-LODK5Y2S.js → docker-2NGBRJFJ.js} +9 -7
- package/dist/{docker-edge-executor-VHW3JPJS.js → docker-edge-executor-5I4M5QT7.js} +1 -1
- package/dist/{edge-import-ABUDKKJI.js → edge-import-RIWNEIXQ.js} +21 -19
- package/dist/{ensure-container-edge-SW6HENSG.js → ensure-container-edge-3NSYKHRX.js} +6 -6
- package/dist/{executor-XJ6RP4Q2.js → executor-LOYMPU67.js} +3 -3
- package/dist/index.js +269 -331
- package/dist/{nginx-3L4SIBJA.js → nginx-QE4DOM5J.js} +4 -4
- package/dist/{openresty-lua-4WLGDSER.js → openresty-lua-BTAKECCF.js} +2 -2
- package/dist/server/index.js +51643 -45322
- package/dist/server/migrations/0073_project_volumes_object_storage.sql +3 -0
- package/dist/server/migrations/0074_project_compose_path.sql +1 -0
- package/dist/server/migrations/0075_service_command_argv.sql +1 -0
- package/dist/server/migrations/0076_rollback_retention.sql +17 -0
- package/dist/server/migrations/0077_domain_redirect.sql +13 -0
- package/dist/server/migrations/0078_grant_source_scope.sql +30 -0
- package/dist/server/migrations/0079_project_readiness.sql +18 -0
- package/dist/server/migrations/0080_deployment_error_classification.sql +26 -0
- package/dist/server/migrations/0081_project_readiness_repair.sql +34 -0
- package/dist/server/migrations/meta/_journal.json +63 -0
- package/dist/{setup-NU6T2PDU.js → setup-KELALK7H.js} +7 -7
- package/package.json +1 -1
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
localGitSshWriter,
|
|
8
8
|
materializeGitSsh,
|
|
9
9
|
sq
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-I6PSTQIR.js";
|
|
11
11
|
import {
|
|
12
12
|
getTarCreateEnv,
|
|
13
13
|
prepareSourceTarArgs
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZCOQJCZO.js";
|
|
15
15
|
import {
|
|
16
16
|
packageManagerEnsureCommand
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-UMQP7SYT.js";
|
|
18
18
|
import {
|
|
19
19
|
__commonJS,
|
|
20
20
|
__toESM
|
|
@@ -690,66 +690,115 @@ function workspacePrepareRunLine(config, envPrefix, workspacePrepare) {
|
|
|
690
690
|
const body = pmEnsure ? `${pmEnsure} && ${workspacePrepare}` : workspacePrepare;
|
|
691
691
|
return `RUN ${envPrefix}${body}`;
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function stepsRunLine(config, envPrefix, opts) {
|
|
694
|
+
const install = opts.install ? config.installCommand : "";
|
|
695
|
+
const build = opts.build ? config.buildCommand : "";
|
|
694
696
|
const steps = [];
|
|
695
|
-
const pmEnsure = packageManagerEnsureCommand(config.packageManager);
|
|
696
|
-
if (pmEnsure && (
|
|
697
|
+
const pmEnsure = packageManagerEnsureCommand(opts.packageManager ?? config.packageManager);
|
|
698
|
+
if (pmEnsure && (install || build)) {
|
|
697
699
|
steps.push(pmEnsure);
|
|
698
700
|
}
|
|
699
|
-
if (
|
|
701
|
+
if (install) {
|
|
700
702
|
steps.push(`printf '${formatDockerBuildEvent("install", "running")}\\n'`);
|
|
701
|
-
steps.push(buildRunCommand(
|
|
703
|
+
steps.push(buildRunCommand(install, envPrefix));
|
|
702
704
|
steps.push(`printf '${formatDockerBuildEvent("install", "completed")}\\n'`);
|
|
703
705
|
}
|
|
704
|
-
if (
|
|
706
|
+
if (build) {
|
|
705
707
|
steps.push(`printf '${formatDockerBuildEvent("build", "running")}\\n'`);
|
|
706
|
-
steps.push(buildRunCommand(
|
|
708
|
+
steps.push(buildRunCommand(build, envPrefix));
|
|
707
709
|
steps.push(`printf '${formatDockerBuildEvent("build", "completed")}\\n'`);
|
|
708
710
|
}
|
|
709
711
|
return steps.length > 0 ? `RUN ${steps.join(" && ")}` : null;
|
|
710
712
|
}
|
|
713
|
+
function installBuildRunLine(config, envPrefix) {
|
|
714
|
+
return stepsRunLine(config, envPrefix, { install: true, build: true });
|
|
715
|
+
}
|
|
716
|
+
function installRunLine(config, envPrefix) {
|
|
717
|
+
return stepsRunLine(config, envPrefix, { install: true });
|
|
718
|
+
}
|
|
719
|
+
var JS_PACKAGE_MANAGERS = ["pnpm", "yarn", "bun", "npm"];
|
|
720
|
+
function buildOnlyRunLine(config, envPrefix) {
|
|
721
|
+
const command = config.buildCommand?.trim() ?? "";
|
|
722
|
+
const packageManager = JS_PACKAGE_MANAGERS.find(
|
|
723
|
+
(pm) => new RegExp(`(^|\\s|&&\\s*)${pm}\\s`).test(command)
|
|
724
|
+
);
|
|
725
|
+
return stepsRunLine(config, envPrefix, { build: true, packageManager });
|
|
726
|
+
}
|
|
711
727
|
function isPhpRuntime(config) {
|
|
712
|
-
return /^php:/.test(config.runtimeImage);
|
|
728
|
+
return /^php:/.test(config.runtimeImage) || /frankenphp/i.test(config.runtimeImage);
|
|
713
729
|
}
|
|
714
|
-
var
|
|
715
|
-
"
|
|
716
|
-
"
|
|
717
|
-
"
|
|
718
|
-
"
|
|
719
|
-
"
|
|
720
|
-
"
|
|
721
|
-
"
|
|
722
|
-
"
|
|
723
|
-
"
|
|
724
|
-
" fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;",
|
|
725
|
-
" }",
|
|
726
|
-
"}"
|
|
730
|
+
var PHP_EXTENSIONS = [
|
|
731
|
+
"pdo_mysql",
|
|
732
|
+
"pdo_pgsql",
|
|
733
|
+
"redis",
|
|
734
|
+
"pcntl",
|
|
735
|
+
"bcmath",
|
|
736
|
+
"intl",
|
|
737
|
+
"zip",
|
|
738
|
+
"gd",
|
|
739
|
+
"opcache"
|
|
727
740
|
];
|
|
741
|
+
var PHP_EXT_INSTALLER_IMAGE = "mlocati/php-extension-installer:2";
|
|
742
|
+
var PHP_ASSET_BUILD_IMAGE = "node:22-bookworm-slim";
|
|
743
|
+
var PHP_EXT_INSTALL_LINE = `RUN install-php-extensions ${PHP_EXTENSIONS.join(" ")} > /dev/null`;
|
|
728
744
|
function generatePhpDockerfile(config) {
|
|
729
745
|
const sourceDir = builderSourceDir(
|
|
730
746
|
normalizeDockerRootDirectory(config.rootDirectory, config.localPath)
|
|
731
747
|
);
|
|
732
748
|
const envPrefix = buildEnvPrefix(config.envVars);
|
|
733
|
-
const
|
|
734
|
-
const
|
|
749
|
+
const installLine = installRunLine(config, envPrefix);
|
|
750
|
+
const assetBuildLine = buildOnlyRunLine(config, envPrefix);
|
|
735
751
|
const lines = [
|
|
736
752
|
`FROM ${config.buildImage} AS builder`,
|
|
737
|
-
`WORKDIR /workspace`,
|
|
738
|
-
`COPY . /workspace`,
|
|
739
753
|
// php:*-cli ships no Composer — pull the binary from the official image.
|
|
740
754
|
`COPY --from=composer:2 /usr/bin/composer /usr/bin/composer`,
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
`
|
|
755
|
+
`COPY --from=${PHP_EXT_INSTALLER_IMAGE} /usr/bin/install-php-extensions /usr/bin/install-php-extensions`,
|
|
756
|
+
PHP_EXT_INSTALL_LINE,
|
|
757
|
+
`WORKDIR /workspace`,
|
|
758
|
+
`COPY . /workspace`,
|
|
744
759
|
`WORKDIR ${sourceDir}`
|
|
745
760
|
];
|
|
746
|
-
if (
|
|
761
|
+
if (installLine) lines.push(installLine);
|
|
762
|
+
if (assetBuildLine) {
|
|
763
|
+
lines.push(
|
|
764
|
+
`FROM ${PHP_ASSET_BUILD_IMAGE} AS assets`,
|
|
765
|
+
`WORKDIR /workspace`,
|
|
766
|
+
`COPY . /workspace`,
|
|
767
|
+
`WORKDIR ${sourceDir}`,
|
|
768
|
+
assetBuildLine
|
|
769
|
+
);
|
|
770
|
+
}
|
|
771
|
+
const docroot = normalizeRelativePath(config.outputDirectory) || "public";
|
|
747
772
|
lines.push(
|
|
748
773
|
`FROM ${config.runtimeImage} AS runtime`,
|
|
749
|
-
|
|
750
|
-
|
|
774
|
+
PHP_EXT_INSTALL_LINE,
|
|
775
|
+
// --chown on the COPY instead of a trailing `chown -R`: the recursive form
|
|
776
|
+
// rewrites every file into a second layer, doubling the app's size on disk.
|
|
777
|
+
// Ownership has to be settled HERE, before anything mounts: Docker seeds a
|
|
778
|
+
// fresh named volume from the image directory it covers, ownership included,
|
|
779
|
+
// so `/app/storage` is only writable by the runtime user if it was already
|
|
780
|
+
// owned by them in the image (see @repo/core volumes.ts).
|
|
781
|
+
`COPY --from=builder --chown=www-data:www-data ${sourceDir} /app`
|
|
782
|
+
);
|
|
783
|
+
if (assetBuildLine) {
|
|
784
|
+
lines.push(
|
|
785
|
+
`COPY --from=assets --chown=www-data:www-data ${sourceDir}/${docroot} /app/${docroot}`
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
lines.push(
|
|
751
789
|
`WORKDIR /app`,
|
|
752
|
-
|
|
790
|
+
// FrankenPHP's bundled Caddyfile reads the docroot from SERVER_ROOT (default
|
|
791
|
+
// `public/`, resolved against WORKDIR). Setting it keeps the project's
|
|
792
|
+
// outputDirectory authoritative for BOTH what gets served and where the asset
|
|
793
|
+
// stage's output lands — otherwise a project that renamed its docroot builds
|
|
794
|
+
// assets into one directory and serves another.
|
|
795
|
+
`ENV SERVER_ROOT=${docroot}/`,
|
|
796
|
+
// Caddy's config + data dirs are root-owned in the base image, and it writes
|
|
797
|
+
// to both on startup — without this the non-root switch below fails at boot.
|
|
798
|
+
`RUN mkdir -p /data/caddy /config/caddy && chown -R www-data:www-data /data/caddy /config/caddy`,
|
|
799
|
+
// The frankenphp binary carries cap_net_bind_service, so dropping root here
|
|
800
|
+
// still leaves any port bindable.
|
|
801
|
+
`USER www-data`,
|
|
753
802
|
`EXPOSE ${config.port}`
|
|
754
803
|
);
|
|
755
804
|
if (config.startCommand) {
|
|
@@ -914,23 +963,45 @@ var GENERATED_DOCKERFILE_NAME = "Dockerfile.openship";
|
|
|
914
963
|
function toPosixPath2(value) {
|
|
915
964
|
return value.split(sep2).filter(Boolean).join("/");
|
|
916
965
|
}
|
|
966
|
+
function anchorDockerignorePattern(line) {
|
|
967
|
+
const trimmed = line.trim();
|
|
968
|
+
if (!trimmed || trimmed.startsWith("#")) return line;
|
|
969
|
+
const negated = trimmed.startsWith("!");
|
|
970
|
+
const pattern = negated ? trimmed.slice(1) : trimmed;
|
|
971
|
+
if (!pattern || pattern.startsWith("/") || pattern.startsWith("**/")) return line;
|
|
972
|
+
if (pattern.replace(/\/+$/, "").includes("/")) return line;
|
|
973
|
+
return `${negated ? "!" : ""}/${pattern}`;
|
|
974
|
+
}
|
|
917
975
|
async function loadDockerignoreMatcher(rootPath) {
|
|
918
976
|
try {
|
|
919
|
-
|
|
977
|
+
const contents = await readFile(join2(rootPath, ".dockerignore"), "utf-8");
|
|
978
|
+
return (0, import_ignore.default)().add(contents.split(/\r?\n/).map(anchorDockerignorePattern));
|
|
920
979
|
} catch {
|
|
921
980
|
return void 0;
|
|
922
981
|
}
|
|
923
982
|
}
|
|
924
|
-
|
|
983
|
+
function buildFilePaths(config) {
|
|
984
|
+
const paths = /* @__PURE__ */ new Set([".dockerignore"]);
|
|
985
|
+
const candidates = resolveDockerfileCandidates(config.rootDirectory, config.dockerfilePath);
|
|
986
|
+
for (const candidate of candidates) {
|
|
987
|
+
const segments = candidate.split("/");
|
|
988
|
+
for (let depth = 1; depth <= segments.length; depth += 1) {
|
|
989
|
+
paths.add(segments.slice(0, depth).join("/"));
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
return paths;
|
|
993
|
+
}
|
|
994
|
+
async function applyDockerignore(contextDir, config) {
|
|
925
995
|
const matcher = await loadDockerignoreMatcher(contextDir);
|
|
926
996
|
if (!matcher) return;
|
|
997
|
+
const buildFiles = buildFilePaths(config);
|
|
927
998
|
const prune = async (currentPath) => {
|
|
928
999
|
const entries = await readdir2(currentPath, { withFileTypes: true });
|
|
929
1000
|
await Promise.all(
|
|
930
1001
|
entries.map(async (entry) => {
|
|
931
1002
|
const absolutePath = join2(currentPath, entry.name);
|
|
932
|
-
const relativePath = relative2(contextDir, absolutePath);
|
|
933
|
-
if (matcher.ignores(
|
|
1003
|
+
const relativePath = toPosixPath2(relative2(contextDir, absolutePath));
|
|
1004
|
+
if (!buildFiles.has(relativePath) && matcher.ignores(relativePath)) {
|
|
934
1005
|
await rm(absolutePath, { recursive: true, force: true });
|
|
935
1006
|
return;
|
|
936
1007
|
}
|
|
@@ -947,15 +1018,22 @@ async function materializeLocalSource(sourcePath, targetPath) {
|
|
|
947
1018
|
const create = spawn("tar", args, { env: getTarCreateEnv() });
|
|
948
1019
|
const extract = spawn("tar", ["-xzf", "-", "-C", targetPath]);
|
|
949
1020
|
let err = "";
|
|
950
|
-
|
|
1021
|
+
let createErr = "";
|
|
1022
|
+
let createCode = null;
|
|
1023
|
+
create.stderr.on("data", (d) => createErr += d.toString());
|
|
951
1024
|
extract.stderr.on("data", (d) => err += d.toString());
|
|
952
1025
|
create.on("error", reject);
|
|
953
1026
|
extract.on("error", reject);
|
|
1027
|
+
create.on("close", (code) => createCode = code);
|
|
954
1028
|
create.stdout.pipe(extract.stdin);
|
|
955
|
-
extract.on(
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
1029
|
+
extract.on("close", (code) => {
|
|
1030
|
+
if (code === 0 && (createCode ?? 0) === 0) return resolve();
|
|
1031
|
+
const parts = [
|
|
1032
|
+
createCode ? `pack exited ${createCode}: ${createErr.trim().slice(-500)}` : "",
|
|
1033
|
+
code ? `extract exited ${code}: ${err.trim().slice(-500)}` : ""
|
|
1034
|
+
].filter(Boolean);
|
|
1035
|
+
reject(new Error(`context materialize failed (${parts.join(" | ")})`));
|
|
1036
|
+
});
|
|
959
1037
|
});
|
|
960
1038
|
} finally {
|
|
961
1039
|
await cleanup();
|
|
@@ -1021,7 +1099,7 @@ async function prepareSourceTree(config, opts) {
|
|
|
1021
1099
|
} else {
|
|
1022
1100
|
await cloneGitSource(config, contextDir, opts?.onLog);
|
|
1023
1101
|
}
|
|
1024
|
-
await applyDockerignore(contextDir);
|
|
1102
|
+
await applyDockerignore(contextDir, config);
|
|
1025
1103
|
return {
|
|
1026
1104
|
contextDir,
|
|
1027
1105
|
cleanup: async () => {
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
resolveProjectDir,
|
|
8
8
|
resolveStaticOutputPath,
|
|
9
9
|
runLocalBuild
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KNTJ7PSF.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveEnvironment
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KZOBYJUW.js";
|
|
14
14
|
import {
|
|
15
15
|
BuildCancelledError,
|
|
16
16
|
BuildLogger,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
runBuildPipeline,
|
|
20
20
|
sq,
|
|
21
21
|
transferLocalDirectory
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-I6PSTQIR.js";
|
|
23
23
|
import {
|
|
24
24
|
formatDuration,
|
|
25
25
|
isRemoteConnectionError,
|
|
@@ -40,11 +40,12 @@ import {
|
|
|
40
40
|
DeployError,
|
|
41
41
|
LANGUAGES,
|
|
42
42
|
STACKS,
|
|
43
|
+
appVolumeTargets,
|
|
43
44
|
buildOutputTransferExcludes,
|
|
44
45
|
missingOutputDirectoryMessage,
|
|
45
46
|
packageManagerEnsureCommand,
|
|
46
47
|
safeErrorMessage
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-UMQP7SYT.js";
|
|
48
49
|
|
|
49
50
|
// ../../packages/adapters/src/system/remote-journal.ts
|
|
50
51
|
var OPSH_RUN_VERSION = 1;
|
|
@@ -1385,6 +1386,10 @@ async function probeSystemd(executor) {
|
|
|
1385
1386
|
}
|
|
1386
1387
|
|
|
1387
1388
|
// ../../packages/adapters/src/runtime/bare.ts
|
|
1389
|
+
function parentPath(path) {
|
|
1390
|
+
const idx = path.replace(/\/+$/, "").lastIndexOf("/");
|
|
1391
|
+
return idx > 0 ? path.slice(0, idx) : "/";
|
|
1392
|
+
}
|
|
1388
1393
|
var DEFAULT_WORK_DIR = "/opt/openship";
|
|
1389
1394
|
var DEFAULT_BUILD_TIMEOUT = 10 * 60 * 1e3;
|
|
1390
1395
|
var STATIC_RELEASE_BASE = "/opt/openship/static";
|
|
@@ -1401,6 +1406,9 @@ var BareRuntime = class {
|
|
|
1401
1406
|
"streamLogs",
|
|
1402
1407
|
"containerIp",
|
|
1403
1408
|
"rollback",
|
|
1409
|
+
// The release dir + supervisor unit survive a redeploy, so restoring a
|
|
1410
|
+
// past release really is an in-place unit swap (see makeActive).
|
|
1411
|
+
"unitRestore",
|
|
1404
1412
|
"inContainerExec"
|
|
1405
1413
|
]);
|
|
1406
1414
|
workDir;
|
|
@@ -1466,6 +1474,60 @@ var BareRuntime = class {
|
|
|
1466
1474
|
releaseDir(deploymentId) {
|
|
1467
1475
|
return `${this.workDir}/releases/${deploymentId}`;
|
|
1468
1476
|
}
|
|
1477
|
+
/** Per-project directory holding the paths that must survive a release swap.
|
|
1478
|
+
* The `shared/` half of the Capistrano layout `releases/` already implements. */
|
|
1479
|
+
sharedDir(projectId) {
|
|
1480
|
+
return `${this.workDir}/shared/${projectId}`;
|
|
1481
|
+
}
|
|
1482
|
+
/**
|
|
1483
|
+
* Repoint the release's persistent paths at `shared/`, so a redeploy doesn't
|
|
1484
|
+
* take the app's data with the old release.
|
|
1485
|
+
*
|
|
1486
|
+
* Docker gets this from a volume; bare has no mount to hang it on, so the
|
|
1487
|
+
* equivalent is the deploy convention: keep the state outside the release tree
|
|
1488
|
+
* and symlink it in. The first release that ships the path SEEDS the shared
|
|
1489
|
+
* copy from it — frameworks ship a skeleton there (Laravel's `storage/` has
|
|
1490
|
+
* `framework/cache`, `framework/sessions`, …) and an app handed an empty
|
|
1491
|
+
* directory instead would fail on write.
|
|
1492
|
+
*
|
|
1493
|
+
* Best-effort per path: a box without the shared dir writable is a storage
|
|
1494
|
+
* problem to report, not a reason to fail an otherwise good release.
|
|
1495
|
+
*/
|
|
1496
|
+
async linkPersistentPaths(releaseDir, projectId, volumes, log) {
|
|
1497
|
+
const targets = appVolumeTargets(volumes ?? []);
|
|
1498
|
+
if (targets.length === 0) return;
|
|
1499
|
+
const shared = this.sharedDir(projectId);
|
|
1500
|
+
for (const relative of targets) {
|
|
1501
|
+
const sharedPath = `${shared}/${relative}`;
|
|
1502
|
+
const releasePath = `${releaseDir}/${relative}`;
|
|
1503
|
+
try {
|
|
1504
|
+
if (!await this.executor.exists(sharedPath)) {
|
|
1505
|
+
await this.executor.mkdir(parentPath(sharedPath));
|
|
1506
|
+
if (await this.executor.exists(releasePath)) {
|
|
1507
|
+
await this.executor.exec(`cp -a ${sq(releasePath)} ${sq(sharedPath)}`);
|
|
1508
|
+
} else {
|
|
1509
|
+
await this.executor.mkdir(sharedPath);
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
await this.executor.rm(releasePath);
|
|
1513
|
+
await this.executor.mkdir(parentPath(releasePath));
|
|
1514
|
+
await this.executor.exec(`ln -sfn ${sq(sharedPath)} ${sq(releasePath)}`);
|
|
1515
|
+
log?.({
|
|
1516
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1517
|
+
message: `Persistent path ${relative} \u2192 ${sharedPath}
|
|
1518
|
+
`,
|
|
1519
|
+
level: "info"
|
|
1520
|
+
});
|
|
1521
|
+
} catch (err) {
|
|
1522
|
+
log?.({
|
|
1523
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1524
|
+
message: `Could not persist ${relative}: ${safeErrorMessage(err)}
|
|
1525
|
+
`,
|
|
1526
|
+
level: "warn"
|
|
1527
|
+
});
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1469
1531
|
async promoteBuildArtifact(artifactPath, deploymentId, previousDeploymentId) {
|
|
1470
1532
|
const releaseDir = this.releaseDir(deploymentId);
|
|
1471
1533
|
if (artifactPath === releaseDir) return releaseDir;
|
|
@@ -1727,6 +1789,7 @@ var BareRuntime = class {
|
|
|
1727
1789
|
config.deploymentId,
|
|
1728
1790
|
config.previousDeploymentId
|
|
1729
1791
|
) : stagedDir;
|
|
1792
|
+
await this.linkPersistentPaths(workDir, config.projectId, config.volumes, _onLog);
|
|
1730
1793
|
const sv = await this.supervisor();
|
|
1731
1794
|
const env = {
|
|
1732
1795
|
...Object.fromEntries(
|
|
@@ -6,22 +6,22 @@ import {
|
|
|
6
6
|
CloudRuntime,
|
|
7
7
|
PAGE_CONTAINER_PREFIX,
|
|
8
8
|
provisionCloudWorkspace
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-JLKKYUZA.js";
|
|
10
|
+
import "./chunk-NXFIRK2Z.js";
|
|
11
|
+
import "./chunk-V7BZMGOT.js";
|
|
12
|
+
import "./chunk-KNTJ7PSF.js";
|
|
13
|
+
import "./chunk-KZOBYJUW.js";
|
|
14
|
+
import "./chunk-I6PSTQIR.js";
|
|
15
|
+
import "./chunk-K2RPVGPN.js";
|
|
16
|
+
import "./chunk-ZCOQJCZO.js";
|
|
17
17
|
import "./chunk-RPHRPFEH.js";
|
|
18
18
|
import "./chunk-TYVME3XD.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-RB35YN3J.js";
|
|
20
20
|
import "./chunk-FPRHYBY2.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-6PIYRG5I.js";
|
|
22
22
|
import "./chunk-ILFETZOM.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-EAAGSQXN.js";
|
|
24
|
+
import "./chunk-UMQP7SYT.js";
|
|
25
25
|
import "./chunk-KI2EY3WB.js";
|
|
26
26
|
export {
|
|
27
27
|
CloudRuntime,
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
sanitizeEdgeVhosts,
|
|
21
21
|
sq,
|
|
22
22
|
stopTargetsForStatus
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-6PIYRG5I.js";
|
|
24
24
|
import "./chunk-ILFETZOM.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-EAAGSQXN.js";
|
|
26
|
+
import "./chunk-UMQP7SYT.js";
|
|
27
27
|
import "./chunk-KI2EY3WB.js";
|
|
28
28
|
export {
|
|
29
29
|
EDGE_CONTAINER_NAME,
|
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
import { createRequire as __ospCreateRequire } from "node:module";
|
|
4
4
|
const require = __ospCreateRequire(import.meta.url);
|
|
5
5
|
import {
|
|
6
|
-
DockerRuntime
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
6
|
+
DockerRuntime,
|
|
7
|
+
ownsBuiltImage
|
|
8
|
+
} from "./chunk-CUJXGK7R.js";
|
|
9
|
+
import "./chunk-V7BZMGOT.js";
|
|
10
|
+
import "./chunk-I6PSTQIR.js";
|
|
11
|
+
import "./chunk-ZCOQJCZO.js";
|
|
11
12
|
import "./chunk-RPHRPFEH.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-UMQP7SYT.js";
|
|
13
14
|
import "./chunk-KI2EY3WB.js";
|
|
14
15
|
export {
|
|
15
|
-
DockerRuntime
|
|
16
|
+
DockerRuntime,
|
|
17
|
+
ownsBuiltImage
|
|
16
18
|
};
|
|
@@ -4,7 +4,7 @@ import { createRequire as __ospCreateRequire } from "node:module";
|
|
|
4
4
|
const require = __ospCreateRequire(import.meta.url);
|
|
5
5
|
import {
|
|
6
6
|
DockerEdgeExecutor
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6LKHXB6T.js";
|
|
8
8
|
import "./chunk-TYVME3XD.js";
|
|
9
9
|
import "./chunk-FPRHYBY2.js";
|
|
10
10
|
import "./chunk-KI2EY3WB.js";
|
|
@@ -4,8 +4,9 @@ import { createRequire as __ospCreateRequire } from "node:module";
|
|
|
4
4
|
const require = __ospCreateRequire(import.meta.url);
|
|
5
5
|
import {
|
|
6
6
|
importMigratedSites,
|
|
7
|
-
waitForApiHealth
|
|
8
|
-
|
|
7
|
+
waitForApiHealth,
|
|
8
|
+
waitForEdgeRunning
|
|
9
|
+
} from "./chunk-BS2AXYZX.js";
|
|
9
10
|
import "./chunk-FRNAR33O.js";
|
|
10
11
|
import "./chunk-EI575GHN.js";
|
|
11
12
|
import "./chunk-6APIPIJY.js";
|
|
@@ -13,33 +14,34 @@ import "./chunk-IXCHURVK.js";
|
|
|
13
14
|
import "./chunk-OWED2GRM.js";
|
|
14
15
|
import "./chunk-VWPEKOH6.js";
|
|
15
16
|
import "./chunk-W73X43R7.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-6LKHXB6T.js";
|
|
18
|
+
import "./chunk-JLKKYUZA.js";
|
|
18
19
|
import "./chunk-AVIB7CT7.js";
|
|
19
20
|
import "./chunk-5MZ624VX.js";
|
|
20
21
|
import "./chunk-Q2CIRAOK.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-NNPEG6HM.js";
|
|
23
|
+
import "./chunk-NXFIRK2Z.js";
|
|
23
24
|
import "./chunk-O6ZZF52V.js";
|
|
24
25
|
import "./chunk-JYGD5WSN.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-CUJXGK7R.js";
|
|
27
|
+
import "./chunk-V7BZMGOT.js";
|
|
28
|
+
import "./chunk-YWMODKWL.js";
|
|
29
|
+
import "./chunk-KNTJ7PSF.js";
|
|
30
|
+
import "./chunk-KZOBYJUW.js";
|
|
31
|
+
import "./chunk-I6PSTQIR.js";
|
|
32
|
+
import "./chunk-K2RPVGPN.js";
|
|
33
|
+
import "./chunk-ZCOQJCZO.js";
|
|
33
34
|
import "./chunk-RPHRPFEH.js";
|
|
34
35
|
import "./chunk-TYVME3XD.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-RB35YN3J.js";
|
|
36
37
|
import "./chunk-FPRHYBY2.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-6PIYRG5I.js";
|
|
38
39
|
import "./chunk-ILFETZOM.js";
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-EAAGSQXN.js";
|
|
41
|
+
import "./chunk-UMQP7SYT.js";
|
|
41
42
|
import "./chunk-KI2EY3WB.js";
|
|
42
43
|
export {
|
|
43
44
|
importMigratedSites,
|
|
44
|
-
waitForApiHealth
|
|
45
|
+
waitForApiHealth,
|
|
46
|
+
waitForEdgeRunning
|
|
45
47
|
};
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
localContainerEdgeProvider,
|
|
11
11
|
resolveEdgeImage,
|
|
12
12
|
setDefaultEdgeImage
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-NXFIRK2Z.js";
|
|
14
|
+
import "./chunk-KZOBYJUW.js";
|
|
15
15
|
import "./chunk-RPHRPFEH.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-RB35YN3J.js";
|
|
17
17
|
import "./chunk-FPRHYBY2.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-6PIYRG5I.js";
|
|
19
19
|
import "./chunk-ILFETZOM.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-EAAGSQXN.js";
|
|
21
|
+
import "./chunk-UMQP7SYT.js";
|
|
22
22
|
import "./chunk-KI2EY3WB.js";
|
|
23
23
|
export {
|
|
24
24
|
buildEdgeRunCommand,
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
createExecutor,
|
|
9
9
|
createHostExecutor,
|
|
10
10
|
hostControlDisabled
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-K2RPVGPN.js";
|
|
12
|
+
import "./chunk-ZCOQJCZO.js";
|
|
13
13
|
import "./chunk-RPHRPFEH.js";
|
|
14
14
|
import {
|
|
15
15
|
LocalExecutor
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
wrapLocalBuildCommand
|
|
19
19
|
} from "./chunk-FPRHYBY2.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-UMQP7SYT.js";
|
|
21
21
|
import "./chunk-KI2EY3WB.js";
|
|
22
22
|
export {
|
|
23
23
|
LocalExecutor,
|