https://github.com/2m/gcloud-pubsub-client
Docker image with Google Cloud PubSub Python client
https://github.com/2m/gcloud-pubsub-client
Last synced: 4 months ago
JSON representation
Docker image with Google Cloud PubSub Python client
- Host: GitHub
- URL: https://github.com/2m/gcloud-pubsub-client
- Owner: 2m
- License: other
- Created: 2018-04-28T12:19:20.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-28T12:50:16.000Z (about 8 years ago)
- Last Synced: 2025-10-27T04:42:05.339Z (7 months ago)
- Homepage: https://hub.docker.com/r/martynas/gcloud-pubsub-client/
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GCloud PubSub Client [![build-badge][]][build] [![microb-badge][]][microb] [![pulls-badge][]][pulls] [![stars-badge][]][stars]
[build]: https://hub.docker.com/r/martynas/gcloud-pubsub-client/builds/
[build-badge]: https://img.shields.io/docker/build/martynas/gcloud-pubsub-client.svg
[microb]: https://microbadger.com/images/martynas/gcloud-pubsub-client
[microb-badge]: https://images.microbadger.com/badges/image/martynas/gcloud-pubsub-client.svg
[pulls]: https://hub.docker.com/r/martynas/gcloud-pubsub-client/
[pulls-badge]: https://img.shields.io/docker/pulls/martynas/gcloud-pubsub-client.svg
[stars]: https://hub.docker.com/r/martynas/gcloud-pubsub-client/
[stars-badge]: https://img.shields.io/docker/stars/martynas/gcloud-pubsub-client.svg
Docker image with [Google Cloud PubSub Python client](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/pubsub/cloud-client).
## Usage with docker-compose
Add the following to your `docker-compose.yml`:
```yml
services:
gcloud-pubsub-client:
image: martynas/gcloud-pubsub-client
links:
- "gcloud-pubsub-emulator"
environment:
- "PUBSUB_PROJECT_ID=test-project"
- "PUBSUB_EMULATOR_HOST=gcloud-pubsub-emulator:8538"
command: publisher.py test-project create testTopic
gcloud-pubsub-emulator:
image: bigtruedata/gcloud-pubsub-emulator
ports:
- "8538:8538"
command: start --host-port=0.0.0.0:8538 --data-dir=/data
```
Then start containers with
```
docker-compose up gcloud-pubsub-client
```
The client container will start after the emulator and it will create the `testTopic` topic.