Skip to content

austin1237/clip-stitcher

Repository files navigation

clip-stitcher

CircleCI
A worker process that once a day combines and archives popular stream clips. architecture

Prerequisites

You must have the following installed/configured on your system for this to work correctly

  1. Docker
  2. Docker-Compose

Environment Variables

The following variables need to be set on your local/ci system.

TWITCH_CLIENT_ID

  1. Have a Twitch account
  2. Regisiter a new Twitch application
  3. Set the Oauth redirect url to http://localhost
  4. Pick anything from the application categories
  5. Copy and save the client id presented as the envoirment variable TWITCH_CLIENT_ID

TWITCH_CHANNEL_NAME

Name of your channel

YOUTUBE_AUTH

Use the base64 string returned from yt-server-oauth

Development Environment

The development enviroment uses lambci's docker-lambda image to run any code that would be deployed as a lambda function. To emulate aws's Dynamodb/Sns/Sqs a localstack image is combined with Terraform.

Start up

To build the lambdas and spin up the distributed development environment run the following command

docker-compose -f lambdaBuilder.yml up  && docker-compose up

Tests

To run tests use the following command

docker-compose -f testRunner.yml up

Deployment

Deployment currently uses Terraform to set up AWS services.

Setting up remote state

Terraform has a feature called remote state which ensures the state of your infrastructure to be in sync for mutiple team members.

This project requires this feature to be configured. To configure USE THE FOLLOWING COMMAND ONCE PER TEAM.

docker-compose -f terraform-compose.yml run tf init_remote_state

Manual

The following commands will deploy to dev/prod environment manually.

docker-compose -f terraform-compose.yml run tf deploy_dev
docker-compose -f terraform-compose.yml run tf deploy_prod

Automation CI/CD

This project uses CircleCI workflows for CI/CD the configuration for this is in .circleci

About

clip combiner/archiver

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published