This service provides endpoints to manage memberships of Unguard users.
- .NET 7 SDK (https://dotnet.microsoft.com/download/dotnet/7.0)
- environment variables - They are set in Properties/launchSettings.json for local build
- A running MariaDB
docker run --detach --name memberships-db \
--env MARIADB_PASSWORD=mariadb-root-password \
--env MARIADB_DATABASE=memberships \
-p 3306:3306 \
mariadb:10.6.12
And then update the environment variables for the membership-service to fit:
export MARIADB_PASSWORD=mariadb-root-password
export MARIADB_SERVICE=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' memberships-db)
dotnet build
docker build -t membership-service .
Service will run on port 8083.
dotnet run MembershipService.dll
Image will be forwarded to port 80
docker run -it -p 80:8083 --name membership-service-container membership-service
Returns the current membership of the requested user ID.
Update the user membership by providing it as simple form parameter to the post request:
membership={membershipText}