In the DDEV project directory launch the command:
ddev get machine-rc/ddev-frontend-nextjs
Restart the DDEV instance:
ddev restart
Access NextJS frontend application on defined port (or 3003
default) via the url: https://your-project-name.ddev.site:3003/
-
Clone the repository:
git clone git@github.com:machine-rc/ddev-frontend-nextjs.git cd ddev-frontend-nextjs
-
Navigate to the project directory:
cd frontend
-
Install the dependencies:
npm install
-
Build the project:
npm run build
The project includes a Dockerfile to build a Docker image for the service.
Current structure allows support for multiple graphql services. To add a new service:
- create a new directory in the
frontend
directory with the service name. - copy the
Dockerfile
from thefrontend/nextjs
directory and modify it as needed. - adjust
docker-compose.frontend-nextjs.yaml
to include the new service by duplicating thedotnet-users
service and changing the service name- adjust the
environment
section to expose the new service on a different port
- adjust the