PWA with Choo
PWA built with Choo and Fastify
Demo: https://choo-pwa.nearform.com/
Features:
Libraries used:
npm run watch
npm start
npm run build
This repo has its own CircleCI project attached to it: https://circleci.com/gh/nearform/react-pwa
Whenever a new commit is pushed into master, a new CircleCI build will be triggered and that build will follow the steps defined in .circleci/config.yml
:
Dockerfile
latest
and that has been pushed to the registry by the above step)This app is hosted on a AWS ECS Fargate cluster. This basically let’s you define a task (what container to run) and a cluster to run it on, just like the clasic ECS cluster. The difference is that you do not need to define and manage EC2 instances in the cluster, it is all abstracted for you. You just need to define the resources (CPU, memory) you need and that’s it.
On top of that, there is a ECS service defined, that puts together what load balancer, what cluster and task to use.
The loadbalancer in this case is a purely TCP loadbalancer. That’s because we wanted to make sure we use HTTP2 for this application, and the node app is configured to serve that. That also means that node serves the SSL certificate, which can be found in the https
dir and needs to be renewed every 3 months as it is generated by letsencrypt. Upon renewal, it will need to be built in the docker container and redeployed.
Copyright 2018 nearForm
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.