Skip to content

demianbucik/rpi-radio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rpi-radio

Music streaming from YouTube for Raspberry Pi

This project is a work in progress.

Radio server

Running the server locally

First, move to the server folder cd radio. Create a link to the development version of the config file.

ln -sf dev.env.toml config/env.toml

Vendor all modules.

go mod vendor

Compile and run the binary. Some packages are using cgo, which means gcc is required for compiling.

go build
./radio

Or simply run with go run main.go. After running, the server listens for requests at localhost:8000.

The app will be started in development mode. To start the app in production mode, set the environment variable RADIO_ENV=prod.

Cross-compiling and deploying to Raspberry Pi

We are targeting arm64 processor architecture. First, build the docker image with all dependencies for cross-compiling.

make builder

Then, using this image, compile the radio server (make sure the modules are vendored).

make build_server

The compiled binary will be outputted to the artifacts folder.

Build the client.

make build_client

If you want, you can also compile the server and the client with a single make build.

Deploy the app.

make deploy

Database

We are using SQLite for the database.

Configuration

You can change configurations such as the port or database file name by editing the config/env.toml file.

About

Music streaming for Raspberry Pi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published