Bootstrapping an API Server using fastify
- pino for logging
- convict for configuration
- fastify-swagger to document the API
- prometheus for monitoring
- yargs for command line processing
- npm as the build tool .... for now
To run the lint task, which is based on the Airbnb Style
$npm run-script lintTo build a docker image
$npm run-script docker:buildTo run up the server in a docker container
$npm run-script docker-runTo start the server in local mode
$npm startThe is a very simple Helm chart to deploy the service to a Kubernetes cluster
helm upgrade --install --namespace demo fastify-bootstrap helm/fastify-bootstrap --debugWe can set the certificate once we have the certmanager configured using the following. This will automatically
create the specified certificates for the domain names in the certificate. It will create the TLS certs and store
them in a kuberenetes secrets, which can be references by the ingress component.
kubectl apply -f helm/fastify-bootstrap/certificate.yamlHere is another document on using the cert managet