Part of the ZarishSphere Platform - A No-Code FHIR Healthcare Data Management System
This repository contains the infrastructure configuration for deploying the ZarishSphere Platform, including Docker Compose files and Kubernetes manifests for orchestrating all services.
- Containerization: Docker & Docker Compose
- Orchestration: Kubernetes
- Services Included:
- Zarish FHIR Server
- Zarish Terminology Server
- PostgreSQL Database
- Keycloak Authentication
- Elasticsearch (optional)
- Docker: Version 20+ (Download Docker)
- Docker Compose: Version 2+ (included with Docker Desktop)
- Kubernetes (optional): For production deployment
- kubectl CLI tool
- Minikube (for local testing) or cloud provider (AWS EKS, GKE, AKS)
- Git: For version control
docker --version # Should show 20.x or higher
docker-compose --version # Should show 2.x or higher
kubectl version # Should show client and server versionscd ~/Desktop
git clone https://github.com/ZarishSphere-Platform/zarish-fhir-infra.git
cd zarish-fhir-infraThe infrastructure expects the following repositories to be cloned in the parent directory:
cd ~/Desktop
git clone https://github.com/ZarishSphere-Platform/zarish-fhir-server.git
git clone https://github.com/ZarishSphere-Platform/zarish-terminology-server.git
git clone https://github.com/ZarishSphere-Platform/zarish-frontend-shell.gitYour directory structure should look like:
~/Desktop/
βββ zarish-fhir-infra/
βββ zarish-fhir-server/
βββ zarish-terminology-server/
βββ zarish-frontend-shell/
Create a .env file in the docker directory:
cd docker
touch .envAdd the following configuration:
# PostgreSQL
POSTGRES_DB=zarish_fhir
POSTGRES_USER=zarish
POSTGRES_PASSWORD=your_secure_password
# Keycloak
KEYCLOAK_ADMIN=admin
KEYCLOAK_ADMIN_PASSWORD=admin_password
# Application
FHIR_SERVER_PORT=8081
TERMINOLOGY_SERVER_PORT=8082
FRONTEND_PORT=3000# Navigate to docker directory
cd docker
# Start all services
docker-compose up -d
# Check service status
docker-compose ps
# View logs
docker-compose logs -fOnce all services are running:
- Frontend: http://localhost:3000
- FHIR Server: http://localhost:8081/fhir
- Terminology Server: http://localhost:8082/fhir
- Keycloak: http://localhost:8080
- PostgreSQL: localhost:5432
- Open http://localhost:8080
- Login with admin credentials
- Create realm:
zarish - Create clients for each service
- Configure client settings
zarish-fhir-infra/
βββ docker/
β βββ docker-compose.yml # Docker Compose configuration
β βββ zarish-fhir-server/ # FHIR server Docker config
β βββ zarish-terminology-server/ # Terminology server config
β βββ .env # Environment variables
βββ k8s/
β βββ namespace.yaml # Kubernetes namespace
β βββ postgres-deployment.yaml # PostgreSQL deployment
β βββ keycloak-deployment.yaml # Keycloak deployment
β βββ fhir-server-deployment.yaml
β βββ terminology-server-deployment.yaml
β βββ frontend-deployment.yaml
β βββ ingress.yaml # Ingress configuration
βββ README.md
| Command | Description |
|---|---|
docker-compose up -d |
Start all services in background |
docker-compose down |
Stop all services |
docker-compose ps |
List running services |
docker-compose logs -f [service] |
View service logs |
docker-compose restart [service] |
Restart a service |
docker-compose build |
Rebuild images |
# Start Minikube
minikube start
# Create namespace
kubectl apply -f k8s/namespace.yaml
# Deploy PostgreSQL
kubectl apply -f k8s/postgres-deployment.yaml
# Deploy Keycloak
kubectl apply -f k8s/keycloak-deployment.yaml
# Deploy FHIR Server
kubectl apply -f k8s/fhir-server-deployment.yaml
# Deploy Terminology Server
kubectl apply -f k8s/terminology-server-deployment.yaml
# Deploy Frontend
kubectl apply -f k8s/frontend-deployment.yaml
# Setup Ingress
kubectl apply -f k8s/ingress.yaml
# Check deployments
kubectl get pods -n zarish-platform
kubectl get services -n zarish-platformFor production deployment on cloud providers:
- Update image references in deployment files
- Configure secrets for sensitive data
- Setup persistent volumes for databases
- Configure ingress with TLS certificates
- Setup monitoring and logging
# Check FHIR Server
curl http://localhost:8081/health
# Check Terminology Server
curl http://localhost:8082/health
# Check PostgreSQL
docker-compose exec postgres pg_isready
# Check Keycloak
curl http://localhost:8080/health# Check Docker daemon
docker info
# Check logs
docker-compose logs [service-name]
# Remove containers and restart
docker-compose down
docker-compose up -d# Check what's using a port
lsof -i :8081
# Kill the process
kill -9 <PID>
# Or change ports in .env file# Access PostgreSQL container
docker-compose exec postgres psql -U zarish -d zarish_fhir
# Check database exists
\l
# Check tables
\dt# Describe pod
kubectl describe pod <pod-name> -n zarish-platform
# View logs
kubectl logs <pod-name> -n zarish-platform
# Get events
kubectl get events -n zarish-platform# Pull latest images
docker-compose pull
# Rebuild and restart
docker-compose up -d --build# Apply updated manifests
kubectl apply -f k8s/
# Rollout restart
kubectl rollout restart deployment/fhir-server -n zarish-platform- Test changes locally with Docker Compose
- Validate Kubernetes manifests
- Update documentation
- Submit pull request
- Check Issues
- Create new issue with:
- Service logs
- Configuration files
- Steps to reproduce