diff --git a/.env b/.env index f531bf5d9a2e..e0c452bd3222 100644 --- a/.env +++ b/.env @@ -6,3 +6,4 @@ DATABASE_DB=dataline DATABASE_URL=jdbc:postgresql://db:5432/dataline CONFIG_ROOT=data/config WORKSPACE_ROOT=/tmp/workspace +WORKSPACE_DOCKER_MOUNT=workspace diff --git a/dataline-scheduler/src/main/java/io/dataline/scheduler/WorkerRunFactory.java b/dataline-scheduler/src/main/java/io/dataline/scheduler/WorkerRunFactory.java index 9c03362d3d23..ef578af3165e 100644 --- a/dataline-scheduler/src/main/java/io/dataline/scheduler/WorkerRunFactory.java +++ b/dataline-scheduler/src/main/java/io/dataline/scheduler/WorkerRunFactory.java @@ -78,13 +78,14 @@ public WorkerRun create(final Job job) { return creator.create( jobRoot, checkConnectionInput, - new SingerCheckConnectionWorker(new SingerDiscoverSchemaWorker(job.getConfig().getDiscoverSchema().getDockerImage(), pbf))); + new SingerCheckConnectionWorker(new SingerDiscoverSchemaWorker(job.getConfig().getCheckConnection().getDockerImage(), pbf))); case DISCOVER_SCHEMA: final StandardDiscoverSchemaInput discoverSchemaInput = getDiscoverSchemaInput(job.getConfig().getDiscoverSchema()); return creator.create( jobRoot, discoverSchemaInput, new SingerDiscoverSchemaWorker(job.getConfig().getDiscoverSchema().getDockerImage(), pbf)); + case SYNC: final StandardSyncInput syncInput = getSyncInput(job.getConfig().getSync()); final SingerDiscoverSchemaWorker discoverSchemaWorker = new SingerDiscoverSchemaWorker(job.getConfig().getSync().getSourceDockerImage(), pbf); diff --git a/docker-compose.yaml b/docker-compose.yaml index f167f324e001..e0e9e752a7af 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -19,7 +19,11 @@ services: - WAIT_BEFORE_HOSTS=5 - WAIT_HOSTS=db:5432 - WORKSPACE_ROOT=${WORKSPACE_ROOT} + - WORKSPACE_DOCKER_MOUNT=${WORKSPACE_DOCKER_MOUNT} - CONFIG_ROOT=${CONFIG_ROOT} + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - "${WORKSPACE_DOCKER_MOUNT}:${WORKSPACE_ROOT}" depends_on: - db server: @@ -44,3 +48,7 @@ services: - 8000:80 depends_on: - server + +volumes: + workspace: + name: ${WORKSPACE_DOCKER_MOUNT}