Skip to content

mattesno1/stream-page

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

stream.mattes.io

YouTube Channel

Spring Boot and Angular app to expose unlisted YouTube streams on your own terms on your own server.

build

in the src/main/angular directory run

  • npm install
  • ng build then run ./gradlew build in the root directory

(npm and angular-cli required)

run in dummy mode

run ./gradlew bootRun to try it out with dummy data

run against YouTube API

  1. enable the youtube API: set app.youtube.enabled to true in the application.yaml
  2. configure Google OAuth 2.0 credentials: in the application.yaml, set the properties app.youtube.client_id and app.youtube.client_secret
  3. configure a refresh token: run the app with ./gradlew bootRun and visit http://localhost:8080/setup to get an Authentication Code.
    With that Auth Code go to http://localhost:8080/setup?authCode=<auth_code> to get the refresh token.
    Then set the app.youtube.refresh_token property in the application.yaml accordingly.

From then on, you can run the app via ./gradlew bootRun -Pargs=--app.youtube.enabled=true,--app.youtube.refresh_token=<token> which will disable the setup endpoint and enable the YouTube API to retrieve active and completed streams.

docker

build and run the docker image as usual:

  • to build execute docker build -t streams .
  • run it with docker run -d -P --name=streams streams

configure credentials

create a file named application-secrets.yaml with the following properties with the correct values:

# secret properties
app:
  youtube:
    enabled: true
    client_id: GOOGLE_OAUTH_CLIENT_ID
    client_secret: GOOGLE_OAUTH_CLIENT_SECRET
    refresh_token: GOOGLE_OAUTH_REFRESH_TOKEN

to get the correct values, follow the steps from above.

run the docker container mounting the application-secrets.yaml into the /secrets folder inside the container:

docker run -d -P -v /absolute/path/to/application-secrets.yaml:/secrets/application-secrets.yaml --name=streams streams

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published