From 925d982a643cfdc6e904f8d007d2bd48d71bd142 Mon Sep 17 00:00:00 2001 From: ha-enthus1ast Date: Tue, 12 Dec 2023 18:32:03 +0000 Subject: [PATCH] Added docker compose file --- README.md | 13 +++++++++++++ docker-compose.yml | 12 ++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index ff8374c..7a0a2ba 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ A simple mqtt gateway to connect your plejd devices to an MQTT broker and Home A - [Setting Up and Running as a Docker Container](#setting-up-and-running-as-a-docker-container) - [Building the Docker Image](#building-the-docker-image) - [Running the Docker Container](#running-the-docker-container) + - [Running with Docker Compose](#running-with-docker-compose) - [Configuration](#configuration) - [General](#general) - [API](#api) @@ -113,6 +114,18 @@ docker run -v ./config/:/config/ --rm --net=host --privileged -it plejd This command starts a new Docker container from the plejd image. The program inside the container will start running immediately. +#### Running with Docker Compose + +As an alternative to the `docker run` command, you can use Docker Compose to manage your application. + +To start the application with Docker Compose, run: + +```bash +docker-compose up +``` + +This command will start a new Docker container from the plejd image, just like the docker run command. The program inside the container will start running immediately. + ## Configuration Configuration of the application. See example configuration [here](#example). diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6a4c444 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +# A basic docker compose file for running the current version of plejd-mqtt-ha + +version: "3.8" +services: + plejd: + build: + context: . + dockerfile: Dockerfile + volumes: + - ./config/:/config/ + network_mode: host + privileged: true