- A React single page app
- transpiled from Typescript
- built with Esbuild
- deployed on push using git actions
- deployed using a docker image
- testing with react-testing-library using Vite
Install dependencies
npm i
Regenerates the build and starts the app, watching for file changes.
npm start
Runs react-testing-library test suite with Vite.
npm t
Filter on one test
npm t my-test-file
Creates a minified version of the build translpiled from TS
npm run build
Breaks down bundle packages and sizes
npm run analyze
This repo is set up to deploy the app directly to fly.io whenever code is pushed to the main
branch.
This is done using github actions, see https://fly.io/docs/launch/continuous-deployment-with-github-actions/
See github actions section on the repo to check on deployment status and re-run deployment.
Watch your deployment at https://fly.io/apps/polka-ui/monitoring
The docker image is used to deploy the app to fly.io using github actions. See ./DockerFile
Builds an image named polka
tagged dev
in this folder .
docker build -t polka:dev .
Runs the image and maps container port 4000 to machine port 4000
docker run -p 4000:4000 polka:dev
Serving app at 0.0.0.0:4000
Access app at http://localhost:4000 in browser
Show all containers:
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d06f8c66e40a polka:dev "docker-entrypoint.s…" 7 minutes ago Up 2 minutes 0.0.0.0:4000->4000/tcp fervent_hertz
Get the container id and use it for:
- docker logs
- docker inspect
docker logs d06f8c66e40a
docker inspect d06f8c66e40a