Skip to content

Latest commit

 

History

History
194 lines (148 loc) · 2.94 KB

File metadata and controls

194 lines (148 loc) · 2.94 KB

Deployment Guide for REChain

This guide provides step-by-step instructions for deploying REChain in various environments.

Prerequisites

  • Flutter SDK 3.32.8 or higher
  • Git
  • Docker (optional)
  • Kubernetes (for production deployments)

Local Development Deployment

1. Clone the Repository

git clone https://github.com/sorydima/REChain-.git
cd REChain-

2. Install Dependencies

flutter pub get

3. Configure Environment

cp config.sample.json config.json
# Edit config.json with your settings

4. Run Locally

flutter run

Production Deployment

Docker Deployment

Build Docker Image

docker build -t rechain:latest .

Run Container

docker run -p 8080:8080 rechain:latest

Kubernetes Deployment

Apply Manifests

kubectl apply -f k8s/

Check Status

kubectl get pods
kubectl get services

Cloud Deployments

AWS

Using Elastic Beanstalk

eb init rechain
eb create production-env

Using ECS

aws ecs create-cluster --cluster-name rechain-cluster
aws ecs create-service --cluster rechain-cluster --service-name rechain-service --task-definition rechain-task

Google Cloud

Using App Engine

gcloud app deploy

Using Cloud Run

gcloud run deploy --source .

Azure

Using App Service

az webapp up --name rechain --runtime "DOTNET|6.0"

Platform-Specific Deployments

Android

flutter build apk --release
# Upload to Google Play Store

iOS

flutter build ios --release
# Upload to App Store Connect

Web

flutter build web --release
# Deploy to web server or CDN

Linux

flutter build linux --release
# Package and distribute

Windows

flutter build windows --release
# Package installer

Configuration

Environment Variables

export MATRIX_HOMESERVER_URL=https://matrix.org
export IPFS_GATEWAY_URL=https://ipfs.io
export BLOCKCHAIN_RPC_URL=https://mainnet.infura.io/v3/YOUR_PROJECT_ID

Database Configuration

{
  "database": {
    "host": "localhost",
    "port": 5432,
    "database": "rechain",
    "username": "rechain_user",
    "password": "secure_password"
  }
}

Monitoring and Logging

Enable Logging

export LOG_LEVEL=info
export LOG_FILE=/var/log/rechain.log

Health Checks

curl http://localhost:8080/health

Scaling

Horizontal Scaling

kubectl scale deployment rechain --replicas=5

Load Balancing

Configure load balancer to distribute traffic across instances.

Backup and Recovery

Database Backup

pg_dump rechain > rechain_backup.sql

File Storage Backup

# Backup IPFS data
ipfs files ls > ipfs_backup.txt

Troubleshooting

See TROUBLESHOOTING.md for common deployment issues.


This deployment guide is part of the REChain documentation suite.