Run a Node.js Cluster on Google Cloud Platform.
- Install Google Cloud SDK
- Create a project on Google Cloud Platform and note down the Project ID
- If using Travis CI:
- Create an account on Travis CI and activate your repository
- Enable Google Cloud Platform > App Engine Admin API
- Create a service account on Google Cloud Platform > IAM with Project > Editor role and download the JSON private key
- Rename the downloaded private key to
travis.server.prod.key.json
and save it in theenvironment/private
folder gem install travis
travis login
tar cvf environment/private.tar -C environment/private . && travis encrypt-file environment/private.tar environment/private.tar.enc -f && rm -f environment/private.tar
npm install
npm start
npm run develop
npm test
Replace GOOGLE-CLOUD-PLATFORM-PROJECT-ID with your Project ID and execute:
export ENVIRONMENT=prod && export PROJECT=GOOGLE-CLOUD-PLATFORM-PROJECT-ID && export VERSION=$(node -p -e "require('./package').version") && export VERSION=${VERSION//[^[:alnum:]^-]} && npm run deploy
Add [deploy]
to you git commit message.