Authentication from based on kwc-auth
running on kano-webengine and sending authentication token through QWebChannel
yarn
Run yarn serve
Bundle and compress the code. Env is pulled from the NODE_ENV
env var. Then just run:
yarn build
The build uses terraform
to deploy the infrastructure and kart
to deploy
the site.
First, initialise the terraform state:
terraform init terraform
Terraform has multiple "workspaces" to handle the different deployments, ensure that the workspace is created:
terraform workspace new staging
or just switch to one if it already exists:
terraform workspace select production
Then deploy the infrastructure. To deploy to staging:
terraform apply terraform
For production:
terraform apply -var-file=terraform/prod.tfvars terraform
Release the code to staging with:
kart archive www --archive-root releases.kano.me --from-repo . --channel staging --name os-auth --release"
and to production with:
kart archive www --archive-root releases.kano.me --from-repo . --channel production --name os-auth --release"
Currently all branches will get deployed - master
will deploy automatically to production and all other branches will deploy to staging.