Giter Site home page Giter Site logo

mboldysh / streaming-service Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 0.0 386 KB

streaming-service allows you to upload your own music to the cloud and broadcast it

License: MIT License

Dockerfile 2.70% Makefile 11.81% Go 82.86% Shell 2.64%
go aws docker streaming streaming-service

streaming-service's Introduction

Streaming Service

Build Status Go Report Card

Streaming Service is a service which allows easily share music across devices by storing it in a cloud and stream it. Developed as an alternative to traditional streaming services one of the main advantages of which besides a huge music library is ability to share music across devices. Ideal for those who have a local music collection and don't want to buy a subscription to the streaming service. Also, as service deployed decentralized, it's easy to share your server with your friends. Just send a link to your service to friends you want to invite and here it is! Use the same username to listen and modify one playlist or use different usernames to have individual playlists. This repository contains the source code for the Streaming Service backend.

Development Setup

There are two options:

1. Run with minio

# build streaming-service
make
# build streaming-service docker image
docker build -t streaming-service .
# up streaming-service and minio
docker-compose -f docker-compose.dev.yml up 

Edit /etc/hosts file and add minio like shown below for correct presigned url work

127.0.0.1 localhost minio

2. Run with AWS S3

Prerequisites:

  • AWS account with full acces to S3.
  • Next environment variables are exported
export AWS_ACCESS_KEY
export AWS_SECRET_ACCESS_KEY
export AWS_REGION

Build streaming-service

make

Usage

Usage of ./streaming-service:
  -b string
        bucket name (default "streaming-service-bucket")
  -dev
        development mode
  -p string
        server port (default ":8080")
  -t duration
        presigned url expire time (default 10m0s)

Deploy to AWS

  1. To deploy Streaming Service you need to setup AWS CLI. Detailed information can be found here: https://aws.amazon.com/cli/

  2. Build docker image

docker build -t streaming-service:latest .
  1. Push docker image to container registry(e.g. Docker Hub or AWS ECR)

  2. Configure deployment parameters. Open .env file in cloudformation directory. As S3 bucket name is globally unique, buckets names should be changed to unique ones. IMAGE_ADDRESS should be set to the adress of the image which was pushed in previous step. Optionally, REGION can be changed to preferable one

  3. Deploy stack:

# Open cloudformation folder
cd cloudformation
# Deploy stack
make full-deploy

Upon completing these steps cloudformation stack will start to creating. Cloudformation creation can be tracked in AWS Cloudformation console. After stack creation will be completed, server adress can be found in stack outputs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.