Files
docker-recorder/docker-compose-mqtt.yml
Malte Deiseroth 8b63ac0296 New Dockerfile for Recorder
The problem with the current solution is that it provide a monolytic
multiprogramm docker container. However the idiom of docker is to
have one service per docker container. If multiple services are
needed multiple docker container should be used. Docker-compose
makes this easily possible.

Another isse is that the container automatically creates certificates
and sets up encryption using a script. Also this violates docker
idioms, because certificate handling can be done using specific
containers like letsencrypt. It further makes it hard to include this
image into an existing and possible complex infastructure.

A further goal of mine would be to generate a Hassio addon for the
homeassistant project from this. The current dockerfile makes this
kind of hard.

What I did:
- Slimmed down the container to about 10MB by using alpine as a base
- Added a `docker-compose.yml` file that shows how to build and run
  the container
- Added a `docker-compose-mqtt.yml` file to show how a mqtt broker
  can be added. This shows how a plug and play solution using
  docker could look like.
- Changed the docker image label to owntracks/recorder
- Added documentation on how to use and configure the image
- Simple travis file for possible automatic building in the near
  future
- Removed automatic certificate handling
  Instead provide `config` volume to allow configuration.
- Removed arm32v7 build
  should be readded later but I dont have a setup for testing right
  now

What might be added at some point:
- Example with nginx reverse proxy
- Example with letsencrypt certificate
  This could also be an example for a complete plug and play
  solution. Proxy, SSl, MQTT and Recorder.
- Default resolv.conf file with all default options and documentation
- Upload to docker hub
- Change name to owntracks/recorder
- Some more examples for eclipse mosquitto
2019-01-08 16:55:16 +01:00

33 lines
559 B
YAML

version: '3'
services:
otrecorder:
image: owntracks/recorder
ports:
- 8083:8083
volumes:
- config:/config
- store:/store
restart: unless-stopped
environment:
OTR_HOST: mosquitto
mosquitto:
image: eclipse-mosquitto
ports:
- 1883:1883
- 8883:8883
volumes:
- mosquitto-data:/mosquitto/data
- mosquitto-logs:/mosquitto/logs
- mosquitto-conf:/mosquitto/config
restart: unless-stopped
volumes:
store:
config:
mosquitto-data:
mosquitto-logs:
mosquitto-conf: