React-Typescript-Nextjs boilerplate with Docker to run the code in isolated env. Folder structure added to get started with basic web-applications. Docker deployment configuration set to use Nginx with caching. Eslint & Prettier set up to auto-update file on save along with using Husky & Lint-Staged to run lint check on git commit.
- Docker
- Next.js
- Typescript
- Nginx (prod)
- Eslint & Prettier
- Husky & Lint-Staged
git clone git@github.com:akash4393/react-nextjs-docker-nginx.git
cd ./react-nextjs-docker-nginx
docker compose up --build
- Go to http://localhost:3000
- Stop process
Cmd + C
docker compose down
docker compose -f docker-compose.prod.yml up --build
- Go to http://localhost:80
- Stop process
Cmd + C
docker compose -f docker-compose.prod.yml down
- Add the following to vscode settings.json
"[typescriptreact]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.insertSpaces": true,
"editor.tabSize": 2,
},
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.insertSpaces": true,
"editor.tabSize": 2,
},
- Network timeout error on docker compose up
- Rerun docker compose command