Coder Social home page Coder Social logo

rehabstudio / record-store-day Goto Github PK

View Code? Open in Web Editor NEW
0.0 5.0 0.0 9.01 MB

The source code for spindontstream.com, a React and Spotify API app we hacked together for record store day 2016

License: Apache License 2.0

JavaScript 86.31% CSS 12.68% HTML 1.02%

record-store-day's Introduction

Record Store Day

Setup

Install dependencies

npm install

Install nodemon

npm install -g nodemon

Run

npm start

Data

A JS object is embedded into the page which has the details of each user and album

it is in the following format

var data = {
  'colors': [], // Hex colors from album artwork
  'user': {}, // User object
  'album': {} // Album object
}

Deployment

The site is hosted on Google Compute Engine. Inorder to dpeloy you need to install the gcloud tools and make sure you have access to the project

Initialise the project

gcloud init

Follow the instructions to authenticate and choose record-store-day when prompted.

Set the compute zone

gcloud config set compute/zone us-central1-a

Install Kubernetes tools

gcloud components install kubectl

Get the cluster credentials

gcloud container clusters get-credentials record-store-day --zone=us-central1-a --project=record-store-day

Create a new tagged Docker image

Make sure the Docker daemon is running

docker-machine start default

Build the image

We need to make sure we create a new tag for each image. Tags should follow this format gcr.io/<PROJECT_ID>/record-store-day:v1.0.0

The current version of the app is stored in the VERSION file in the project root. Bump this each time using semver notation and update the VERSION file when you deploy. You can also check the latest version on the Google Container Registry

docker build -t <TAG> .

(e.g docker build -t gcr.io/record-store-day/record-store-day:v1.0.0 .)

Push to Google Container engine

gcloud docker push <TAG>

(e.g gcloud docker push gcr.io/record-store-day/record-store-day:v1.0.0)

Update the deployment.yaml to use the new image

Open deploy/deployment.yaml and update the image` property to the new tag

spec:
  containers:
  - name: record-store-day
    image: gcr.io/record-store-day/record-store-day:v1.0.0

Apply the updates to the pods

kubectl apply -f deploy/deployment.yaml

Monitor the deployment

Deployments are usually very fast but if you need to monitor what's going on you can use this command

kubectl describe deployment

Libraries used

record-store-day's People

Contributors

rickydunlop avatar

Watchers

Josh Noble avatar James Cloos avatar StealthCT avatar Lucas Lucas avatar  avatar

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.