File: docker.md

package info (click to toggle)
amqtt 0.11.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,660 kB
  • sloc: python: 14,565; sh: 42; makefile: 34; javascript: 27
file content (40 lines) | stat: -rw-r--r-- 957 bytes parent folder | download
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
# Containerization

`amqtt` library is available on [PyPI](https://pypi.python.org/pypi/amqtt), [GitHub](https://github.com/Yakifo/amqtt) and [Read the Docs](http://amqtt.readthedocs.org/).

Built from [Dockerfile](https://github.com/Yakifo/amqtt/blob/main/dockerfile), the default `aMQTT` broker is publicly available on [DockerHub](https://hub.docker.com/repository/docker/amqtt/amqtt).

## Launch

```shell
$ docker run -d -p 1883:1883 amqtt/amqtt:latest
```

## Configure and launch

The easiest way to provide a custom [aMQTT broker configuration](references/broker_config.md),
is to create a yaml file...

```shell
$ cp amqtt/scripts/default_broker.yaml broker.yaml
```

and create a docker compose file...

```yaml
services:
  amqtt:
    image: amqtt
    container_name: amqtt
    ports:
      - "1883:1883"
    volumes:
      - ./broker.yaml:/app/conf/broker.yaml
```

and launch with...

```shell
$ docker compose -d -f docker-compose.yaml up
```