This is the source code for my offical website harrytang.xyz. It is built using Next.js and Tailwind CSS. The backend is built using Strapi.
To get started with docker, first clone this repo and run the following command to start a shell in a docker container:
docker run -it --rm -v $(pwd):/app -w /app node:20-alpine sh
Next, install the dependencies:
npm install
Next, create a .env.local
file in the root of your project and set the the nessary environment variables.
Finally, run the development server:
docker-compose up -d
Finally, open http://localhost:3000 in your browser to view the website.
To run the e2e tests, run the following command:
docker run --rm -it -v ${PWD}:/workspace -w /workspace mcr.microsoft.com/playwright:latest bash
export $(cat .env.build.local | grep -v '^#' | xargs)
npm run build
npx playwright install --with-deps
npm run test:e2e