For Linux, Mac, and Windows: Docker Desktop
Use this command to run Docker hello-world image
docker run hello-world
generate a token from github container registry:
github:
- go to settings
- Click on developer settings at the bottom
- Click on personal access tokens tab
- Click on Tokens (classic)
- Click on generate new Token (classic)
- Enable the settings: write:packages and delete:packages
- Give it a name then generate the token
Enter your username and token (as a password) using the following flags, either for GitHub Container Registry or Docker Hub.
echo "YOUR_PERSONAL_ACCESS_TOKEN" | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
All the commands you need to start and stop the project are here in this section.
Start the project by using this command to pull the built image and run it in a container:
docker compose up app-dev
Stop the project and remove the container created:
docker compose down app-dev
Note: After running docker compose down the image you pulled will still exist on your local computer
Note: For production you just replace app-dev with app-prod
See all docker images
docker image ls
See all docker containers
docker ps -a
Remove an image
docker rmi image_name_or_ID
Remove a container
docker rm container_name_or_ID
Install dependencies
pnpm i
Run Storybook in the project root
npm run storybook
Run RTL && Jest in the project root
pnpm test
Run all Playwright tests
pnpm exec playwright test
Run single Playwright tests
pnpm exec playwright test (name of file)
Search for and open settings.json
by pressing cmd+shift+p
on MacOS or ctrl+shift+p
on Windows.
Important
There may be multiple options, ensure you select the option that says "Open User Settings (JSON)
Add the following lines to your settings.json
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
Open a file and save it, you should see formatting changes made as soon as you save it!