Debian Codegraph @

autopaho/examples/docker/docker-compose.yml

raw symbols SCIP
1 version: "3.8"
2 services:
3 mosquitto:
4 image: eclipse-mosquitto
5 networks:
6 - paho-test-net
7 # ports declaration not needed when running under docker but useful for debugging outside of it!
8 ports:
9 - target: 1883
10 published: 1883
11 protocol: tcp
12 mode: host
13 volumes:
14 - type: bind
15 source: ./binds/mosquitto/config
16 target: /mosquitto/config
17 read_only: true
18 - type: bind
19 source: ./binds/mosquitto/data
20 target: /mosquitto/data
21 - type: bind
22 source: ./binds/mosquitto/log
23 target: /mosquitto/log
24 pub:
25 # We include the whole paho module in the context because otherwise a separate module would be needed (and this would
26 # pull in github.com/eclipse/paho.golang which makes testing difficult.
27 build:
28 context: ../../../
29 dockerfile: autopaho/examples/docker/publisher/dockerfile
30 environment:
31 pubdemo_serverURL: tcp://mosquitto:1883
32 pubdemo_clientID: mqtt_publisher
33 pubdemo_topic: topic1
34 pubdemo_qos: 1
35 pubdemo_keepAlive: 30
36 pubdemo_connectRetryDelay: 10000
37 pubdemo_delayBetweenMessages: 1000
38 pubdemo_sessionfolder: /binds/sessionstate
39 pubdemo_printMessages: "true"
40 pubdemo_debug: "true"
41 networks:
42 - paho-test-net
43 volumes:
44 - type: bind
45 source: ./binds/sessionstate
46 target: /binds/sessionstate
47 sub:
48 # We include the whole paho module in the context because otherwise a separate module would be needed (and this would
49 # pull in github.com/eclipse/paho.golang which makes testing difficult.
50 build:
51 context: ../../../
52 dockerfile: autopaho/examples/docker/subscriber/dockerfile
53 environment:
54 subdemo_serverURL: ws://mosquitto:8080
55 subdemo_clientID: mqtt_subscriber
56 subdemo_topic: topic1
57 subdemo_qos: 1
58 subdemo_keepAlive: 30
59 subdemo_connectRetryDelay: 10000
60 subdemo_sessionfolder: /binds/sessionstate
61 subdemo_writeToStdout: "true"
62 subdemo_writeToDisk: "false"
63 subdemo_OutputFile: "/binds/sub/receivedMessages.txt"
64 subdemo_debug: "true"
65 networks:
66 - paho-test-net
67 volumes:
68 - type: bind
69 source: ./binds/sub
70 target: /binds/sub
71 - type: bind
72 source: ./binds/sessionstate
73 target: /binds/sessionstate
74 # Using a custom network is not required but useful for testing (you can take the network down and see what happens)
75 # e.g. `docker network disconnect docker_paho-test-net docker_sub_1`
76 networks:
77 paho-test-net:
78 external: false