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 lint
To build a docker image
$npm run-script docker:build
To run up the server in a docker container
$npm run-script docker-run
To start the server in local mode
$npm start
The is a very simple Helm chart to deploy the service to a Kubernetes cluster
helm upgrade --install --namespace demo fastify-bootstrap helm/fastify-bootstrap --debug
We 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.yaml
Here is another document on using the cert managet