-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.googlecloudpubsub.yml
56 lines (51 loc) · 1.97 KB
/
docker-compose.googlecloudpubsub.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# docker-compose -f docker-compose.googlecloudpubsub.yml up --build -d
# https://hub.docker.com/r/singularities/pubsub-emulator
# docker run -it --rm -p "8085:8085" -e PUBSUB_PROJECT_ID=my-project google/cloud-sdk gcloud beta emulators pubsub start --host-port=0.0.0.0:8085
version: "3.4"
networks:
app-tier:
driver: bridge
services:
pubsub:
image: google/cloud-sdk #singularities/pubsub-emulator #google/cloud-sdk
container_name: pubsub
environment:
PUBSUB_PROJECT_ID: my-project
PUBSUB_LISTEN_ADDRESS: "0.0.0.0:8085"
ports:
- "8085:8085"
command: ["gcloud", "beta", "emulators", "pubsub", "start", "--host-port", "0.0.0.0:8085"]
networks:
- app-tier
sample-googlecloudpubsub-producer:
build:
context: .
dockerfile: ./src/Samples/Sample.GoogleCloudPubSub.Producer/Dockerfile
container_name: Sample.GoogleCloudPubSub.Producer
volumes:
- ./.docker/googlecloudpubsub/Sample.GoogleCloudPubSub.Producer/Logs/:/app/Logs/
environment:
PUBSUB_PROJECT_ID: my-project
PUBSUB_TOPIC_ID: my-topic
PUBSUB_SUBSCRIPTION_ID: my-sub
PUBSUB_EMULATOR_HOST: "192.168.1.2:8085" # "pubsub:8085"
depends_on:
- pubsub
networks:
- app-tier
sample-googlecloudpubsub-consumer:
build:
context: .
dockerfile: ./src/Samples/Sample.GoogleCloudPubSub.Consumer/Dockerfile
container_name: Sample.GoogleCloudPubSub.Consumer
volumes:
- ./.docker/googlecloudpubsub/Sample.GoogleCloudPubSub.Consumer/Logs/:/app/Logs/
environment:
PUBSUB_PROJECT_ID: my-project
PUBSUB_TOPIC_ID: my-topic
PUBSUB_SUBSCRIPTION_ID: my-sub
PUBSUB_EMULATOR_HOST: "192.168.1.2:8085" # "pubsub:8085"
depends_on:
- pubsub
networks:
- app-tier