In the DDEV project directory launch the command:
ddev get machine-rc/ddev-dotnet
Restart the DDEV instance:
ddev restart
Access .NET application on defined port (or 8080
default) via the url: https://your-project-name.ddev.site:8080/
-
Clone the repository:
git clone [email protected]:machine-rc/ddev-dotnet.git cd ddev-dotnet
-
Navigate to the project directory:
cd apis/Users.API
-
Restore the .NET dependencies:
dotnet restore
-
Build the project:
dotnet build
- To run the project locally, use the following command:
dotnet run
- Open your browser and navigate to
http://localhost:8080
orhttp://localhost:8081
.
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
dotnet
directory with the service name - copy the
Dockerfile
from thedotnet/Users.API
directory - adjust
docker-compose.dotnet.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