programsam / binkjs

Music archival site BINK, rewritten as a Node.js express app
0 stars 1 forks source link

BINK.js

BINK! is an experiment in musical documentation.

You have things like SoundCloud and ReverbNation and others that allow bands to post their stuff online. Sometimes, though, as a musician, this isn't enough because you produce a bunch of different recordings with a bunch of different people and it becomes not so much about image or brand promotion as it is just having an archive that lets you see the Who, What, Where and When that happened in a particular recording.

Where is SoundCloud's feature that shows you what each musician played on this recording? What if there was a set break? Where were these recordings on SoundCloud made? Can I see a map of that? What day exactly, was this recording finished on? Let me see all the recordings that were created at a certain location. Anyway, BINK makes all of this easy and allows for easy sharing of recordings between musicians. You make a recording, you post it to BINK and then you can easily share with your fellow musicians.

Searching also makes it quite easy to find out "what was that I thing I played last spring with those guys from college?" and so on.

Developer Setup

Overview:

  1. Install Node.js for your OS.
  2. Install MySQL for your OS.
  3. Setup MySQL for BINK.js.
  4. Setup an Amazon S3 bucket.
  5. Configure BINK.js for development.
  6. Install dependencies.
  7. Run.

Install Node.js and MySQL

Outside the scope of this README; if you can't install these packages, BINK.js probably isn't something you should run for yourself.

Setup MySQL

BINK.js needs access to a running instance of MySQL that has a database set aside specifically for BINK. It's recommended that you install BINK.js with an application user and password that is reserved just for BINK operations, for added security.

On a macos system using MySQL Shell,

S3 Bucket

You will need to register for an AWS account, if you don't already have one.

Get AWS Credentials

For local development, you should also set up an S3 bucket with public read permissions.

Create an S3 bucket.

It's also recommended that you create a folder within your bucket called public.

Set appropriate permissions for your S3 bucket. Your bucket will need to be publicly accessible.

Your S3 bucket will also not have ACLs allowed by default. If ACLs are not allowed, you will not be able to upload assets (tracks, images, videos) via the Binkjs admin console.

In order to resolve this, do the following:

Once you have setup the bucket, you'll need to gather the following from the Amazon Web Console for your S3 bucket:

These items all go into your settings.json under the section s3. See below for more information.

Configure BINK.js for Development

Production Setup

Nginx

Nginx is a useful reverse proxy that we expect you to deploy in front of BINK to manage things like caching and https-to-http termination, etc. Note that you'll need something like the following in your Nginx configuration for BINK.js:

Check out the example nginx.conf configuration file to get started with configuring Nginx for BINK.js usage. Further documentation of each setting and what they do is available in that file.

Ubuntu/Systemd Service

You'll want to configure a Systemd Service for BINK.js that is separate from the frontend reverse proxy, like Nginx (see previous section). This Service will start BINK.js when your machine turns on, and can restart BINK.js if it crashes. Checkout our example systemd service for more information.