BirdNET-stream/docs/DOCKER.md

54 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

# Use docker to run BirdNET-stream
There are two ways to run BirdNET-stream using docker: a "all in one" container, running all services on the same container, or using a splitted approach, running each service on a separate container.
## Prerequisites
- docker
- docker-compose (for splitted approach)
- git
## Using the all in one container (not working yet)
The all in one container is a container that runs all services on the same container.
You can follow the instructions in [./docker/all/README.md](./docker/all/README.md) to create this container.
## Using the splitted approach (recommended)
The splitted approach uses docker-compose and a docker container for each service.
This is the recommended approach to run BirdNET-stream while using docker.
2022-08-23 06:06:18 +02:00
First of of all, you need to clone the repository.
```bash
mkdir ~/Documents/BirdNET-stream
cd ~/Documents/BirdNET-stream
git clone -b main https://github.com/UncleSamulus/BirdNET-stream.git .
```
Then, create your dotenv file and populate it with your own configuration (for instance, generate random passwords and add them to .env credentials):
```bash
cp .env.example .env
```
You may need to adapt the listening ports of the services or other configuration parameters.
In general all variables stated with ${VARIABLE:-default} inside [../docker-compose.yml](../docker-compose.yml) can be override in the .env file using `VARIABLE=value`.
Once that is done, you can build and start docker services:
```bash
2022-08-25 07:22:58 +02:00
# Build images (first time only, and for each update)
2022-08-23 06:06:18 +02:00
docker compose build
# Run
2022-08-23 06:06:18 +02:00
docker compose up # add `-d`, to run in background
# Stop
docker compose down
```
2022-08-23 06:06:18 +02:00
For a one liner:
```bash
2022-08-23 06:06:18 +02:00
docker compose up --build
```