MS
MinerSheets by Diofis
Sign In

Access Required

Sign in to access MinerSheets revolutionary features

Sign In Now
Dark Mode
Toggle theme

Access Required

Sign in to access MinerSheets revolutionary features

Sign In Now
Dark Mode
Toggle theme

Access Required

Sign in to access MinerSheets revolutionary features

Sign In Now
Dark Mode
Toggle theme

Access Required

Sign in to access MinerSheets revolutionary features

Sign In Now
Dark Mode
Toggle theme
↑↓ Navigate ↵ Select ESC Close
Powered by Fuse.js

Welcome to MinerSheets

The backbone of operational excellence

Home / Documentation / Deployment

🚀 Production Deployment Guide

Deploy MinerSheets to production with confidence and zero downtime

📋 Deployment Checklist

✓ Prerequisites & Requirements ✓ Environment Configuration ✓ Docker Deployment ✓ Security Hardening ✓ Monitoring & Logging ✓ Backup Strategy

📦 Prerequisites

🖥️

Server Requirements

  • • Ubuntu 20.04+ or Debian 11+ (recommended)
  • • Minimum 2 GB RAM (4 GB+ recommended)
  • • 20 GB available disk space
  • • Public IP address with domain name
🐳

Software Requirements

  • • Docker 20.10+ and Docker Compose 2.0+
  • • Nginx for reverse proxy (recommended)
  • • SSL certificate (Let's Encrypt)
  • • Git for deployment automation
🔐

Security Essentials

  • • Firewall configured (UFW or iptables)
  • • SSH key-based authentication
  • • Non-root user with sudo privileges
  • • Fail2ban for intrusion prevention

⚙️ Environment Configuration

Create .env.production with production settings:

# Django Settings
DJANGO_ENV=production
DEBUG=False
SECRET_KEY=your-super-secret-key-min-50-chars-long-randomly-generated
ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com

# Database Configuration
DB_NAME=minersheets_prod
DB_USER=minersheets_user
DB_PASSWORD=strong-database-password
DB_HOST=db
DB_PORT=5432

# Security Settings
CSRF_TRUSTED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com
SECURE_SSL_REDIRECT=True
SESSION_COOKIE_SECURE=True
CSRF_COOKIE_SECURE=True

# Email Configuration (for notifications)
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password

# Redis (for caching and sessions)
REDIS_URL=redis://redis:6379/0

# Monitoring
SENTRY_DSN=your-sentry-dsn-if-using

⚠️ Security Warning: Never commit .env.production to git. Add it to .gitignore and store secrets in a secure vault.

🐳 Docker Production Deployment

Step 1: Clone Repository

cd /opt
sudo git clone https://github.com/yourusername/MinerSheets.git
cd MinerSheets
sudo chown -R $USER:$USER .

Step 2: Configure Environment

# Copy and edit production environment file
cp .env.production.example .env.production
nano .env.production  # Edit with your settings

# Generate Django secret key
python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"

Step 3: Build and Start Services

# Build production images
docker-compose -f config/docker-compose.production.yml build

# Start all services
docker-compose -f config/docker-compose.production.yml up -d

# Check service status
docker-compose -f config/docker-compose.production.yml ps

Step 4: Initialize Database

# Run migrations
docker-compose -f config/docker-compose.production.yml exec web python manage.py migrate

# Create superuser
docker-compose -f config/docker-compose.production.yml exec web python manage.py createsuperuser

# Collect static files
docker-compose -f config/docker-compose.production.yml exec web python manage.py collectstatic --noinput

Step 5: Configure Nginx Reverse Proxy

# /etc/nginx/sites-available/minersheets
server {
    listen 80;
    server_name yourdomain.com www.yourdomain.com;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl http2;
    server_name yourdomain.com www.yourdomain.com;

    ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;

    client_max_body_size 100M;

    location / {
        proxy_pass http://localhost:9320;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    location /static/ {
        alias /opt/MinerSheets/staticfiles/;
        expires 30d;
    }

    location /media/ {
        alias /opt/MinerSheets/media/;
        expires 7d;
    }
}

Step 6: Enable and Test Nginx

# Enable site
sudo ln -s /etc/nginx/sites-available/minersheets /etc/nginx/sites-enabled/

# Test configuration
sudo nginx -t

# Reload Nginx
sudo systemctl reload nginx

🔒 Security Hardening

Critical Security Checklist

  • ✓ DEBUG=False in production environment
  • ✓ SECRET_KEY is unique and never committed to git
  • ✓ ALLOWED_HOSTS restricted to your domains only
  • ✓ HTTPS enforced with SSL/TLS certificates
  • ✓ Database password is strong and unique
  • ✓ Firewall configured to allow only necessary ports
  • ✓ Regular updates applied to OS and packages

Configure Firewall (UFW)

# Allow SSH, HTTP, HTTPS
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

# Enable firewall
sudo ufw enable

# Check status
sudo ufw status

📊 Monitoring & Logging

Application Logs

# View Django logs
docker-compose logs -f web

# View Nginx logs
sudo tail -f /var/log/nginx/access.log
sudo tail -f /var/log/nginx/error.log

Health Checks

# Check health endpoint
curl https://yourdomain.com/health/

# Check container status
docker ps

# Check database
docker exec -it db psql -U postgres

💾 Backup Strategy

Database Backup Script

#!/bin/bash
# backup-database.sh

BACKUP_DIR="/opt/backups/minersheets"
DATE=$(date +%Y%m%d_%H%M%S)
BACKUP_FILE="$BACKUP_DIR/minersheets_$DATE.sql"

# Create backup directory
mkdir -p $BACKUP_DIR

# Perform backup
docker exec db pg_dump -U postgres minersheets_prod > $BACKUP_FILE

# Compress backup
gzip $BACKUP_FILE

# Remove backups older than 30 days
find $BACKUP_DIR -name "*.sql.gz" -mtime +30 -delete

echo "Backup completed: ${BACKUP_FILE}.gz"

Automated Daily Backups (Cron)

# Edit crontab
crontab -e

# Add daily backup at 2 AM
0 2 * * * /opt/MinerSheets/scripts/backup-database.sh >> /var/log/minersheets-backup.log 2>&1

🔧 Troubleshooting

Container won't start

Check logs and rebuild:

docker-compose logs
docker-compose down
docker-compose up -d --build
502 Bad Gateway

Check if Django is running and port is correct:

docker-compose ps
curl http://localhost:9320
sudo nginx -t
Static files not loading

Recollect static files:

docker-compose exec web python manage.py collectstatic --noinput
sudo systemctl reload nginx

📚 Related Documentation

🏗️
Architecture
System design
⚙️
Installation
Local setup
🤝
Contributing
Join the project
💬
Support
Get help
MS
MinerSheets

Revolutionary Data Management platform by Diofis Enterprise. Phenomenal artwork in technology that transforms how companies manage data.

Made with ❤️ in Bitung, North Sulawesi, Indonesia by Hendrik Mamarodia.

Quick Links

  • Dashboard
  • All Models
  • Model Factory

Support

  • User Guide
  • API Reference
  • Help Center
  • About Us
  • Site Map
  • Privacy Policy
  • Terms of Service

© 2025 MinerSheets by Diofis Enterprise (Data Infra Ekselen). All rights reserved.

LinkedIn Company Developer Bitung, Indonesia