Skip to content

Commit

Permalink
Merge pull request #8 from ellwoodb/master
Browse files Browse the repository at this point in the history
Add Docker install instructions
  • Loading branch information
chrivers authored Aug 24, 2024
2 parents e0f180d + d1b5efe commit d313d9d
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 8 deletions.
67 changes: 62 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,18 @@ might like to read the [comparison with DiyHue](doc/comparison-with-diyhue.md).

## Installation guide

To install Bifrost, you will need the following:
There are currently two ways you can install Bifrost.

1. The rust language toolchain (https://rustup.rs/)
2. At least one zigbee2mqtt server to connect to
3. The MAC address of the network interface you want to run the server on
1. [Install manualy](#manual) from source (for now, this is the preferred method)
2. [Install it via Docker](#docker) (still WIP, some aspects may not be optimal for now)

### Manual

To install Bifrost from source, you will need the following:

1. The rust language toolchain (https://rustup.rs/)
2. At least one zigbee2mqtt server to connect to
3. The MAC address of the network interface you want to run the server on

When you have these things available, install bifrost:

Expand Down Expand Up @@ -89,12 +96,62 @@ At this point, the server should start: (log timestamps omitted for clarity)
...
```
The log output shows Bifrost talking with zigbee2mqtt, and finding some lights to control (office_{1,2,3}).
The log output shows Bifrost talking with zigbee2mqtt, and finding some lights to control (office\_{1,2,3}).
At this point, you're running a Bifrost bridge.
The Philips Hue app should be able to find it on your network!
### Docker
> [!WARNING]
> Docker support was [merged recently](https://github.com/chrivers/bifrost/pull/2).
> If you encounter any bugs, or have suggestions, feel free to leave your feedback
> [here](#problems-questions-feedback).
To install Bifrost with Docker, you will need the following:
1. At least one zigbee2mqtt server to connect to
2. The MAC address of the network interface you want to run the server on
3. A running [Docker](https://docs.docker.com/engine/install/) instance
with [Docker-Compose](https://docs.docker.com/compose/install/) installed
4. Have `git` installed to clone this repository
When you have these things available, you can install Bifrost by running these commands:
```
git clone https://github.com/chrivers/bifrost
cd bifrost
```
Then rename or copy our `config.example.yaml`:
```
cp config.example.yaml config.yaml
```
And edit it with your favorite editor to your liking (see
[configuration reference](doc/config-reference.md)).
If you want to put your configuration file or the certificates Bifrost creates somewhere
else, you also need to adjust the mount paths in the `docker-compose.yaml`. Otherwise,
just leave the default values.
Now you are ready to run the app with:
```
docker compose up -d
```
This will build and then start the app on your Docker instance.
To view the logs, use a tool like [Portainer](https://www.portainer.io/) or
run the following command:
```
docker logs bifrost
```
# Configuration
See [configuration reference](doc/config-reference.md).
Expand Down
1 change: 1 addition & 0 deletions config.example.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
bifrost:
# Override the default path to the one used in the docker image
cert_file: "certs/cert.pem"

bridge:
Expand Down
9 changes: 6 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
services:
bifrost:
build: .
volumes:
- /path/to/app-data/config.yaml:/app/config.yaml
- /path/to/app-data/certs:/app/certs
container_name: bifrost
restart: unless-stopped
network_mode: host
volumes:
# If you followed the guide on our readme, these paths work out of the box
- ./config.yaml:/app/config.yaml
- ./certs:/app/certs

0 comments on commit d313d9d

Please sign in to comment.