Skip to content

Commit d313d9d

Browse files
authored
Merge pull request #8 from ellwoodb/master
Add Docker install instructions
2 parents e0f180d + d1b5efe commit d313d9d

File tree

3 files changed

+69
-8
lines changed

3 files changed

+69
-8
lines changed

README.md

+62-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,18 @@ might like to read the [comparison with DiyHue](doc/comparison-with-diyhue.md).
1010

1111
## Installation guide
1212

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

15-
1. The rust language toolchain (https://rustup.rs/)
16-
2. At least one zigbee2mqtt server to connect to
17-
3. The MAC address of the network interface you want to run the server on
15+
1. [Install manualy](#manual) from source (for now, this is the preferred method)
16+
2. [Install it via Docker](#docker) (still WIP, some aspects may not be optimal for now)
17+
18+
### Manual
19+
20+
To install Bifrost from source, you will need the following:
21+
22+
1. The rust language toolchain (https://rustup.rs/)
23+
2. At least one zigbee2mqtt server to connect to
24+
3. The MAC address of the network interface you want to run the server on
1825

1926
When you have these things available, install bifrost:
2027

@@ -89,12 +96,62 @@ At this point, the server should start: (log timestamps omitted for clarity)
8996
...
9097
```
9198
92-
The log output shows Bifrost talking with zigbee2mqtt, and finding some lights to control (office_{1,2,3}).
99+
The log output shows Bifrost talking with zigbee2mqtt, and finding some lights to control (office\_{1,2,3}).
93100
94101
At this point, you're running a Bifrost bridge.
95102
96103
The Philips Hue app should be able to find it on your network!
97104
105+
### Docker
106+
107+
> [!WARNING]
108+
> Docker support was [merged recently](https://github.com/chrivers/bifrost/pull/2).
109+
> If you encounter any bugs, or have suggestions, feel free to leave your feedback
110+
> [here](#problems-questions-feedback).
111+
112+
To install Bifrost with Docker, you will need the following:
113+
114+
1. At least one zigbee2mqtt server to connect to
115+
2. The MAC address of the network interface you want to run the server on
116+
3. A running [Docker](https://docs.docker.com/engine/install/) instance
117+
with [Docker-Compose](https://docs.docker.com/compose/install/) installed
118+
4. Have `git` installed to clone this repository
119+
120+
When you have these things available, you can install Bifrost by running these commands:
121+
122+
```
123+
git clone https://github.com/chrivers/bifrost
124+
cd bifrost
125+
```
126+
127+
Then rename or copy our `config.example.yaml`:
128+
129+
```
130+
cp config.example.yaml config.yaml
131+
```
132+
133+
And edit it with your favorite editor to your liking (see
134+
[configuration reference](doc/config-reference.md)).
135+
136+
If you want to put your configuration file or the certificates Bifrost creates somewhere
137+
else, you also need to adjust the mount paths in the `docker-compose.yaml`. Otherwise,
138+
just leave the default values.
139+
140+
Now you are ready to run the app with:
141+
142+
```
143+
docker compose up -d
144+
```
145+
146+
This will build and then start the app on your Docker instance.
147+
148+
To view the logs, use a tool like [Portainer](https://www.portainer.io/) or
149+
run the following command:
150+
151+
```
152+
docker logs bifrost
153+
```
154+
98155
# Configuration
99156
100157
See [configuration reference](doc/config-reference.md).

config.example.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
bifrost:
2+
# Override the default path to the one used in the docker image
23
cert_file: "certs/cert.pem"
34

45
bridge:

docker-compose.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
services:
22
bifrost:
33
build: .
4-
volumes:
5-
- /path/to/app-data/config.yaml:/app/config.yaml
6-
- /path/to/app-data/certs:/app/certs
4+
container_name: bifrost
5+
restart: unless-stopped
76
network_mode: host
7+
volumes:
8+
# If you followed the guide on our readme, these paths work out of the box
9+
- ./config.yaml:/app/config.yaml
10+
- ./certs:/app/certs

0 commit comments

Comments
 (0)