This repository includes all tools and documentation to set you up to develop on goSolve's services.
Make sure you have these tools installed:
- .NET 6.0 Sdk (Included in Visual Studio download or download manually here)
- Docker
- You can verify the installation by starting Docker and running
docker version
in a terminal.
- You can verify the installation by starting Docker and running
- Docker Compose (included in Docker for windows and macos, for linux: see instructions)
- mkcert
To be able to run our services over https, we need to install a development certificate.
Execute following commands in this directory (for Windows, use powershell):
# If it's the firt install of mkcert, run
mkcert -install
# Generate local development certificate
mkdir -p $HOME/.dev/gosolve/certs
mkcert -cert-file $HOME/.dev/gosolve/certs/local-cert.pem -key-file $HOME/.dev/gosolve/certs/local-key.pem "localhost" "host.docker.internal"
# Copy root certificate
cp "$(mkcert -CAROOT)/*" $HOME/.dev/gosolve/certs
We have our own nuget packages hosted on GitHub which the projects require.
First you will need to create a GitHub personal access token for your account.
To add our nuget source, run the following commands in a terminal in your goSolve projects directory (this will have effect on all projects in your projects directory):
# Create basic nuget.config file
dotnet new nugetconfig
# Add goSolve source
nuget sources add -Name "gosolve-org" -Source "https://nuget.pkg.github.com/gosolve-org/index.json" -username "YOUR-GITHUB-USERNAME" -password "YOUR-GITHUB-TOKEN" -ConfigFile ./nuget.config
We need to copy the generated root certificate into our project. Execute the next commands in the project directory:
cp $HOME/.dev/gosolve/certs/* ./certs/
First run the docker-compose.yml file in this repository.
This sets up shared dependencies such as Traefik, a database and a redis.
docker-compose up
The next step is running the project (or multiple projects at the same time):
Method | Description |
---|---|
Visual Studio (easiest) | Run the docker-compose project in Visual Studio. (This also enables debugging features.) |
Terminal | Run docker-compose up in a terminal in the project directory. |
⚠️ On errors: Try removing your /obj and /bin folders.
We use Traefik as the reverse proxy for our local development. This means we can spin up as many services as we want without any port conflicts.
This causes some URL differences between Azure hosted services and local services:
Azure: https://my-api.gosolve.org/api/v1/books
Local: https://localhost:5001/my-api/api/v1/books
goSolve is open-source. We use the GNU AGPLv3 licensing strategy.