An open API service indexing awesome lists of open source software.

https://github.com/codekitchen/alarmdecoder-webapp-dockerfile

docker build for alarmdecoder-webapp
https://github.com/codekitchen/alarmdecoder-webapp-dockerfile

Last synced: 7 months ago
JSON representation

docker build for alarmdecoder-webapp

Awesome Lists containing this project

README

          

# AlarmDecoder Webapp Dockerfile

This is a Dockerfile for the [AlarmDecoder Webapp](https://github.com/nutechsoftware/alarmdecoder-webapp) project. It is built by following the build instructions in that project's README, with a few tweaks to adapt to the Docker environment.

## Run Container

The container is available pre-built on [Docker Hub](https://hub.docker.com/r/codekitchen/alarmdecoder-webapp/).

```bash
docker run --rm -p 5000:5000 --device= codekitchen/alarmdecoder-webapp
```

The container will need access to the AlarmDecoder hardware, replace
`` with the correct USB device, e.g. `--device=/dev/ttyUSB0`.

You can then access AlarmDecoder at `http://:5000`.

## Complete Setup

This container exposes the gunicorn workers directly, it's recommended that set
up an nginx reverse proxy in front of the app.

You'll also likely want to created a named or mounted volume to persist the
configuration and logging, which lives at `/opt/alarmdecoder-webapp/instance`.

A complete docker-compose configuration might look something like:

```yaml
proxy:
image: jwilder/nginx-proxy
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- my-certs:/etc/nginx/certs

alarmdecoder:
image: codekitchen/alarmdecoder-webapp
environment:
VIRTUAL_HOST: alarm.example.com
devices:
- /dev/ttyUSB0
volumes:
- alarmdecoder:/opt/alarmdecoder-webapp/instance
```