- Node.js 18+ and npm
- Run
cd next-app, then runnpm installto generate a lockfile.
# in case that you don't create the network yet
docker network create microservices
cp next-app/.env_template next-app/.envFirst, run the development server:
# install development dependencies for visual studio code
cd next-app
npm i
cd ..
docker compose -f deploy/docker-compose.dev.yml up --buildOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.
# Stop all running containers
docker kill $(docker ps -aq) && docker rm $(docker ps -aq)
# Free space
docker system prune -af --volumes.
├── .github # GitHub folder
├── .husky # Husky configuration
├── .vscode # VSCode configuration
├── public # Public assets folder
├── src
│ ├── app # Next JS Pages (app router)
│ ├── components # React components
│ ├── layouts # Layouts components
│ ├── libs # 3rd party libraries
│ ├── pages # Next JS Pages (page router)
│ ├── styles # Styles folder
│ ├── templates # Default template
│ ├── validations # Validation schemas
│ └── utils # Utility functions
├── tailwind.config.ts # Tailwind CSS configuration
└── tsconfig.json # TypeScript configurationThe project enforces Conventional Commits specification. This means that all your commit messages must be formatted according to the specification. To help you write commit messages, the project uses Commitizen, an interactive CLI that guides you through the commit process. To use it, run the following command:
npm run commitOne of the benefits of using Conventional Commits is that it allows us to automatically generate a CHANGELOG file. It
also allows us to automatically determine the next version number based on the types of commits that are included in a
release.
Multistage builds are highly recommended in production. Combined with the
Next Output Standalone
feature, only node_modules files required for production are copied into the final Docker image.