diff --git a/dev-peerdb.sh b/dev-peerdb.sh index 796425f3dd..7c32151845 100755 --- a/dev-peerdb.sh +++ b/dev-peerdb.sh @@ -23,5 +23,11 @@ else EXTRA_ARGS="" fi +# check if peerdb_network exists if not create it +if ! $DOCKER network inspect peerdb_network &> /dev/null +then + $DOCKER network create peerdb_network +fi + export PEERDB_VERSION_SHA_SHORT=local-$(git rev-parse --short HEAD) exec $DOCKER -f docker-compose-dev.yml up --build $EXTRA_ARGS diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index c27ad6bda7..d7d93f6de9 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -1,5 +1,7 @@ version: "3.9" +name: peerdb-quickstart-dev + x-minio-config: &minio-config PEERDB_CLICKHOUSE_AWS_CREDENTIALS_AWS_ACCESS_KEY_ID: _peerdb_minioadmin PEERDB_CLICKHOUSE_AWS_CREDENTIALS_AWS_SECRET_ACCESS_KEY: _peerdb_minioadmin @@ -145,42 +147,14 @@ services: temporal-admin-tools: condition: service_healthy - flow-worker1: - container_name: flow-worker1 - build: - context: . - dockerfile: stacks/flow.Dockerfile - target: flow-worker - environment: - <<: [*catalog-config, *flow-worker-env, *minio-config] - depends_on: - temporal-admin-tools: - condition: service_healthy - - flow-worker2: - container_name: flow-worker2 + flow-worker: + container_name: flow-worker build: context: . dockerfile: stacks/flow.Dockerfile target: flow-worker environment: <<: [*catalog-config, *flow-worker-env, *minio-config] - profiles: - - multi - depends_on: - temporal-admin-tools: - condition: service_healthy - - flow-worker3: - container_name: flow-worker3 - build: - context: . - dockerfile: stacks/flow.Dockerfile - target: flow-worker - environment: - <<: [*catalog-config, *flow-worker-env, *minio-config] - profiles: - - multi depends_on: temporal-admin-tools: condition: service_healthy @@ -244,3 +218,8 @@ services: volumes: pgdata: minio-data: + +networks: + default: + external: true + name: peerdb_network diff --git a/docker-compose.yml b/docker-compose.yml index 75480ecdaf..42fa2f26fc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,7 @@ version: "3.9" +name: peerdb-quickstart + x-minio-config: &minio-config PEERDB_CLICKHOUSE_AWS_CREDENTIALS_AWS_ACCESS_KEY_ID: _peerdb_minioadmin PEERDB_CLICKHOUSE_AWS_CREDENTIALS_AWS_SECRET_ACCESS_KEY: _peerdb_minioadmin @@ -124,33 +126,11 @@ services: temporal-admin-tools: condition: service_healthy - flow-worker1: - container_name: flow-worker1 - image: ghcr.io/peerdb-io/flow-worker:latest-dev - environment: - <<: [*catalog-config, *flow-worker-env, *minio-config] - depends_on: - temporal-admin-tools: - condition: service_healthy - - flow-worker2: - container_name: flow-worker2 + flow-worker: + container_name: flow-worker image: ghcr.io/peerdb-io/flow-worker:latest-dev environment: <<: [*catalog-config, *flow-worker-env, *minio-config] - profiles: - - multi - depends_on: - temporal-admin-tools: - condition: service_healthy - - flow-worker3: - container_name: flow-worker3 - image: ghcr.io/peerdb-io/flow-worker:latest-dev - environment: - <<: [*catalog-config, *flow-worker-env, *minio-config] - profiles: - - multi depends_on: temporal-admin-tools: condition: service_healthy @@ -208,5 +188,9 @@ services: volumes: pgdata: - prometheusdata: minio-data: + +networks: + default: + external: true + name: peerdb_network diff --git a/run-peerdb.sh b/run-peerdb.sh index 20eb6dcf07..002bf93679 100755 --- a/run-peerdb.sh +++ b/run-peerdb.sh @@ -7,5 +7,11 @@ then exit 1 fi +# check if peerdb_network exists if not create it +if ! docker network inspect peerdb_network &> /dev/null +then + docker network create peerdb_network +fi + docker compose pull docker compose -f docker-compose.yml up --no-attach catalog --no-attach temporal --no-attach temporal-ui --no-attach temporal-admin-tools