Skip to content

Deployment Guide

Altug Tatlisu edited this page Dec 6, 2025 · 1 revision

Deployment Guide

Docker Compose (Recommended)

Production Configuration

  1. Update credentials:
# Edit .env file
DATABASE_URL=postgresql://user:CHANGE_THIS@postgres:5432/ecash_db
REDIS_URL=redis://:CHANGE_THIS@redis:6379
  1. Deploy:
docker-compose -f docker-compose.yml up -d
  1. Verify:
docker-compose ps
docker-compose logs -f ecash-server

Scaling

# Scale API servers
docker-compose up -d --scale ecash-server=3

# Nginx automatically load balances

Kubernetes

Prerequisites

  • Kubernetes cluster 1.25+
  • kubectl configured

Deploy

# Create namespace
kubectl create namespace ecash

# Apply manifests
kubectl apply -f deployment/kubernetes/

# Verify
kubectl get pods -n ecash
kubectl get services -n ecash

Scale

kubectl scale deployment ecash-server --replicas=5 -n ecash

Monitor

kubectl logs -f deployment/ecash-server -n ecash
kubectl top pods -n ecash

Manual Deployment

Database Setup

# PostgreSQL
createdb ecash_db
createuser ecash_user -P
psql ecash_db < crates/ecash-server/schema.sql

# Redis
redis-server --requirepass your_password

Server Build

cargo build --release -p ecash-server
./target/release/ecash-server

Environment Variables

export DATABASE_URL=postgresql://ecash_user:pass@localhost:5432/ecash_db
export REDIS_URL=redis://:pass@localhost:6379
export SERVER_PORT=8080

Security Checklist

  • Change default passwords
  • Enable TLS/HTTPS
  • Configure firewall rules
  • Set up monitoring
  • Enable audit logging
  • Configure automated backups
  • Review rate limits
  • Test disaster recovery

Clone this wiki locally