GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — trigger.dev/scripts/docker.mjs at main · triggerdotdev/trigger.dev

Expand file tree

/

docker.mjs

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
61 lines (55 loc) · 1.93 KB
/

docker.mjs

Copy path

File metadata and controls

61 lines (55 loc) · 1.93 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env node
import { execFileSync } from "node:child_process";
import { resolve, dirname } from "node:path";
import { fileURLToPath } from "node:url";
import { execSyncVarlock } from "varlock/exec-sync-varlock";
const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
const args = process.argv.slice(2);
const appEnv = args[0] === "--app-env";
if (appEnv) args.shift();
const composeFilter =
"COMPOSE_*,CONTAINER_PREFIX,*_HOST_PORT,DB_*VOLUME,REPLICA_APPLY_DELAY,GOOSE_COMMAND";
let resolved;
try {
resolved = JSON.parse(
execSyncVarlock(`load --format json --compact${appEnv ? "" : ` --filter ${composeFilter}`}`, {
cwd: appEnv ? resolve(repoRoot, "apps/webapp") : repoRoot,
exitOnError: false,
showLogsOnError: false,
})
);
} catch {
const checkCommand = appEnv ? "pnpm --filter webapp run env:check" : "pnpm run env:check";
console.error(`Unable to load local configuration. Run ${checkCommand} for validation errors.`);
process.exit(1);
}
const env = Object.fromEntries(
Object.entries(resolved)
.filter(([, value]) => value !== null)
.map(([key, value]) => [key, String(value)])
);
// Compose interpolates YAML values, including secrets containing dollar signs.
const composeEnv = Object.fromEntries(
Object.entries(env).map(([key, value]) => [key, value.replaceAll("$", () => "$$")])
);
try {
execFileSync(
"docker",
[
"compose",
...(appEnv ? ["--project-directory", resolve(repoRoot, "docker"), "-f", "-"] : []),
...args,
],
{
cwd: repoRoot,
env: { ...process.env, ...env, COMPOSE_DISABLE_ENV_FILE: "true" },
// The real Compose file merges last, preserving its container-specific URLs.
input: appEnv
? JSON.stringify({ services: { app: { environment: composeEnv } } })
: undefined,
stdio: appEnv ? ["pipe", "inherit", "inherit"] : "inherit",
}
);
} catch (err) {
process.exit(err.status ?? 1);
}
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.