This file shows how to use docker, run application on local machine, running tests and generating test reports and running build on local machines.
- Install Docker on your machine.
- Build your container:
docker build -t nextjs-docker .
. - Run your container:
docker run --env-file ./env -p 3000:3000 nextjs-docker
.
You can view your images created with docker images
, and container with docker ps -a
.
Note: You can change .env values and re-run the conatiner by docker restart <container-name/container-id>
Following Requirements Sould be Fullfilled before running the application
- Enviroment variables should be initialized
- Node must be installed on machine
npm install
npm run dev
To create build run following command
npm install
npm run build
To run build file run following command
npm start
This project uses Jest for unit testing
In your terminal, run the following command:
npm run test
npm run test-coverage