File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { PostStartCauses, PreStopCauses } from "@trigger.dev/core/v3";
14
14
const MACHINE_NAME = process . env . MACHINE_NAME || "local" ;
15
15
const COORDINATOR_PORT = process . env . COORDINATOR_PORT || 8020 ;
16
16
const COORDINATOR_HOST = process . env . COORDINATOR_HOST || "127.0.0.1" ;
17
+ const DOCKER_NETWORK = process . env . DOCKER_NETWORK || "host" ;
17
18
18
19
const OTEL_EXPORTER_OTLP_ENDPOINT =
19
20
process . env . OTEL_EXPORTER_OTLP_ENDPOINT || "http://0.0.0.0:4318" ;
@@ -90,7 +91,7 @@ class DockerTaskOperations implements TaskOperations {
90
91
logger . debug (
91
92
await execa ( "docker" , [
92
93
"run" ,
93
- " --network=host" ,
94
+ ` --network=${ DOCKER_NETWORK } ` ,
94
95
"--rm" ,
95
96
`--env=INDEX_TASKS=true` ,
96
97
`--env=TRIGGER_SECRET_KEY=${ opts . apiKey } ` ,
@@ -113,7 +114,7 @@ class DockerTaskOperations implements TaskOperations {
113
114
114
115
const runArgs = [
115
116
"run" ,
116
- " --network=host" ,
117
+ ` --network=${ DOCKER_NETWORK } ` ,
117
118
"--detach" ,
118
119
`--env=TRIGGER_ENV_ID=${ opts . envId } ` ,
119
120
`--env=TRIGGER_RUN_ID=${ opts . runId } ` ,
You can’t perform that action at this time.
0 commit comments