mirror of
https://github.com/flavioribeiro/donut.git
synced 2025-09-26 19:11:11 +08:00
add instructions on how to develop locally or on docker
This commit is contained in:
17
DOCKER_DEVELOPMENT.md
Normal file
17
DOCKER_DEVELOPMENT.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Developing using docker
|
||||
|
||||
To develop using docker, make sure you have `docker` installed. Run the following command to start simulations of SRT and RTMP streamings, and a bash session where you can run commands such as you'd in your local machine.
|
||||
|
||||
```bash
|
||||
make run-docker-dev
|
||||
```
|
||||
|
||||
Inside the container, you can start the donut server.
|
||||
|
||||
```bash
|
||||
make run-server-inside-docker
|
||||
```
|
||||
|
||||
You can access [http://localhost:8080/demo/](http://localhost:8080/demo/), using preferable the Chrome browser. You can connect to the simulated SRT and see donut working in practice.
|
||||
|
||||
You can work and change files locally, in your OS, and restart `CTRL+C + make run-server-inside-docker` the donut server in the container. It's fast because it avoids rebuilding all images. It'll offer a faster feedback cycle while developing.
|
36
MAC_DEVELOPMENT.md
Normal file
36
MAC_DEVELOPMENT.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Running on MacOS
|
||||
|
||||
To develop using your mac, make sure you have `ffmpeg@5` installed:
|
||||
|
||||
```bash
|
||||
brew install ffmpeg@5
|
||||
```
|
||||
|
||||
You can have multiple versions of ffmpeg installed in your mac. To find where the specific `ffmpeg@5`` was installed, run:
|
||||
|
||||
```bash
|
||||
sudo find /opt/homebrew -name avcodec.h
|
||||
```
|
||||
|
||||
Let's assume the prior command showed two entries:
|
||||
|
||||
```bash
|
||||
sudo find /opt/homebrew -name avcodec.h
|
||||
/opt/homebrew/Cellar/ffmpeg/7.0_1/include/libavcodec/avcodec.h
|
||||
/opt/homebrew/Cellar/ffmpeg@5/5.1.4_6/include/libavcodec/avcodec.h
|
||||
```
|
||||
|
||||
You must configure the CGO library path pointing it to the ffmpeg 5 folder.
|
||||
|
||||
```bash
|
||||
export CGO_LDFLAGS="-L/opt/homebrew/Cellar/ffmpeg@5/5.1.4_6/lib/"
|
||||
export CGO_CFLAGS="-I/opt/homebrew/Cellar/ffmpeg@5/5.1.4_6/include/"
|
||||
export PKG_CONFIG_PATH="/opt/homebrew/Cellar/ffmpeg@5/5.1.4_6/lib/pkgconfig"
|
||||
```
|
||||
|
||||
Now, you can run it locally:
|
||||
|
||||
```bash
|
||||
go run main.go -- --enable-ice-mux=true
|
||||
go test -v ./...
|
||||
```
|
Reference in New Issue
Block a user