Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Mount workspace to scheduler as named volume (airbytehq#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
sherifnada committed Sep 8, 2020
1 parent 1fb0963 commit 0bbf2ba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -44,3 +48,7 @@ services:
- 8000:80
depends_on:
- server

volumes:
workspace:
name: ${WORKSPACE_DOCKER_MOUNT}

0 comments on commit 0bbf2ba

Please sign in to comment.