npm install
npm install -g nodemon
npm start
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
}
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
gcloud init
Follow the instructions to authenticate and choose record-store-day
when prompted.
gcloud config set compute/zone us-central1-a
gcloud components install kubectl
gcloud container clusters get-credentials record-store-day --zone=us-central1-a --project=record-store-day
Make sure the Docker daemon is running
docker-machine start default
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)
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
kubectl apply -f deploy/deployment.yaml
Deployments are usually very fast but if you need to monitor what's going on you can use this command
kubectl describe deployment