Skip to content

Commit

Permalink
chore: add pubsub emulator
Browse files Browse the repository at this point in the history
  • Loading branch information
ucpr committed Dec 2, 2023
1 parent f47bb46 commit a8e32c1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,23 @@ services:
})'" &&
echo 'Finished setting up the replica set...'
pubsub-emulator:
image: gcr.io/google.com/cloudsdktool/cloud-sdk:455.0.0-emulators
command: >
gcloud beta emulators pubsub start --project=dummy-project --host-port=localhost:8085 --quiet &
while ! nc -z localhost 8085; do
sleep 0.1
done
python3 /python-pubsub/samples/snippets/publisher.py dummy-project create dummy-topic
fg %1
environment: # TODO: use environment variables
PUBSUB_PROJECT_ID: "emulator"
PUBSUB_EMULATOR_HOST: "localhost:8085"
PUBSUB_TOPIC_ID: "dymmy-topic"
ports:
- "8085:8085"
entrypoint: /bin/bash

mongo-streamer:
build: .
depends_on:
Expand Down

0 comments on commit a8e32c1

Please sign in to comment.