M.HMuhammad Hashir
  • Work
  • Principles
  • Experience
  • Contact
WorkCV ↓
← All work

Merik Solutions

.NET microservices on Docker

Eight services and their database moved into containers

RoleContainerized and deployed it

Problem

Eight .NET services and their database ran directly on a server, hard to deploy or move.

Actions

  • Packaged all eight services into containers (portable, identical setups) that start in the right order.
  • Moved the SQL Server database into a container and restored the live data.
  • Fixed three deployment failures at the root: outdated settings, file permissions and containers finding each other.

Result

8 services

now run in containers, deployed automatically

Architecture primary focus data outside
ADMIN PORTALAPI GATEWAYAUTHJOBSORDERS & PAYMENTSCHATNOTIFICATIONSMSSQL · HEALTHCHECK
ADMIN PORTALAPI GATEWAYAUTHJOBSORDERS & PAYMENTSCHATNOTIFICATIONSMSSQL · HEALTHCHECK

Details

A gig-marketplace platform built as eight .NET services (sign-in, jobs, orders and payments, chat, notifications, profiles, an API gateway and an admin portal), running directly on a server with SQL Server installed as a system service.

Scope: move all of it into containers and deploy it.

Approach

Each service is compiled and packaged into its own image. One Compose file runs them all on a private network. SQL Server moved off the host into a container with a persistent volume and a health check, and every service waits for the database to be healthy before it starts.

The hard part

Three failures, three lessons

The sign-in service kept crashing. The database didn't exist in the new container, and after it was created the connection still failed: the connection string lives in a settings file, and the packaged output still held the old one. Settings only change after a fresh build.

Restoring the backup failed with access denied because the copied file belonged to root. The fix was to enter the container as root, hand the file to the SQL Server user and restore it.

Finally, logging in reported that the sign-in service was unavailable. The services called each other on 127.0.0.1, which inside a container means the container itself. Switching every address to the service's name fixed it.

Stack, and why

  • Docker Composeone private network and a health-checked start order
  • SQL Server containerpersistent storage and restorable backups
  • GitHub Actionsdeployment to the company's server

Next case study

AI customer-inquiry routing →