Scalingo - GradedJestRisk/cicd-training GitHub Wiki
Create Github repository
Create HAPI hello world
Read port from environment variables
Add Procfile
web: exec node server.js
Add .buildpacks
https://github.com/Scalingo/nodejs-buildpack
Create application in Scalingo
Link to GitHub repository
Deploy
Call server
curl https://APPLICATION_NAME.osc-fr1.scalingo.io/
Check logs
Enable auto-deploy
Add version on route
Start a watcher
watch -n 0.1 curl https://APPLICATION_NAME.osc-fr1.scalingo.io/
Push and chech you get no error while version is deployed
Priority:
-
BUILDPACK_URL
environment variable -
.buildpacks
file - autodctection
- https://github.com/1024pix/pix/blob/dev/.buildpacks
BUILDPACK_URL=https://github.com/1024pix/subdir-buildpack
Node version used comes from package.json
, engine
section
Use PROJECT_DIR
environment variable to deploy a subdirectory
PROJECT_DIR=api