File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { PostStartCauses, PreStopCauses } from "@trigger.dev/core/v3";
1414const MACHINE_NAME = process . env . MACHINE_NAME || "local" ;
1515const COORDINATOR_PORT = process . env . COORDINATOR_PORT || 8020 ;
1616const COORDINATOR_HOST = process . env . COORDINATOR_HOST || "127.0.0.1" ;
17+ const DOCKER_NETWORK = process . env . DOCKER_NETWORK || "host" ;
1718
1819const OTEL_EXPORTER_OTLP_ENDPOINT =
1920 process . env . OTEL_EXPORTER_OTLP_ENDPOINT || "http://0.0.0.0:4318" ;
@@ -90,7 +91,7 @@ class DockerTaskOperations implements TaskOperations {
9091 logger . debug (
9192 await execa ( "docker" , [
9293 "run" ,
93- " --network=host" ,
94+ ` --network=${ DOCKER_NETWORK } ` ,
9495 "--rm" ,
9596 `--env=INDEX_TASKS=true` ,
9697 `--env=TRIGGER_SECRET_KEY=${ opts . apiKey } ` ,
@@ -113,7 +114,7 @@ class DockerTaskOperations implements TaskOperations {
113114
114115 const runArgs = [
115116 "run" ,
116- " --network=host" ,
117+ ` --network=${ DOCKER_NETWORK } ` ,
117118 "--detach" ,
118119 `--env=TRIGGER_ENV_ID=${ opts . envId } ` ,
119120 `--env=TRIGGER_RUN_ID=${ opts . runId } ` ,
You can’t perform that action at this time.
0 commit comments