SaaS/DEPLOY.md
Aimpress Team bda23a773f 🚀 Initial commit: Aimpress AutomationHub
 Features:
- Modern SaaS automation platform
- Next.js 15 + TypeScript frontend
- Node.js + Express backend
- PostgreSQL database with full schema
- Docker Compose setup
- Admin panel with analytics
- Template marketplace (6 templates)
- Integrations hub (10+ services)
- Authentication & role-based access
- Responsive n8n-style design

🎯 Ready for demo and deployment

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 21:58:33 +01:00

3.1 KiB

🚀 Deployment Guide - Aimpress AutomationHub

💻 Локальное развертывание

Требования:

  • Docker & Docker Compose
  • Git

Запуск:

# Клонировать проект
git clone <repository-url>
cd saas-automation-platform

# Запустить все сервисы
docker-compose up -d

# Проверить статус
docker-compose ps

Доступ:


🌐 Облачное развертывание

Option 1: Railway.app

# Установить Railway CLI
npm install -g @railway/cli

# Логин и деплой
railway login
railway init
railway up

Option 2: Vercel + Railway

Frontend (Vercel):

npm install -g vercel
cd frontend
vercel --prod

Backend (Railway):

railway init backend
railway up

Option 3: DigitalOcean App Platform

  1. Создать новое приложение
  2. Подключить GitHub репозиторий
  3. Настроить Docker deployment
  4. Добавить PostgreSQL database

🔧 Переменные окружения

Frontend (.env.local):

NEXT_PUBLIC_API_URL=http://localhost:3001

Backend (.env):

PORT=3001
DB_HOST=postgres
DB_PORT=5432
DB_NAME=saas_automation
DB_USER=postgres
DB_PASSWORD=password
JWT_SECRET=your-secret-key

📱 Ngrok для быстрого показа

# Установить ngrok
brew install ngrok

# Создать туннель
ngrok http 3000

Получите публичный URL типа: https://abc123.ngrok.io


🐳 Production Docker Setup

docker-compose.prod.yml:

version: '3.8'
services:
  frontend:
    build:
      context: ./frontend
      dockerfile: Dockerfile.prod
    ports:
      - "80:3000"
    environment:
      - NEXT_PUBLIC_API_URL=https://api.yourdomain.com

  backend:
    build:
      context: ./backend
      dockerfile: Dockerfile.prod
    ports:
      - "3001:3001"
    environment:
      - NODE_ENV=production
      - DB_HOST=db
    depends_on:
      - db

  db:
    image: postgres:15
    environment:
      - POSTGRES_DB=saas_automation
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=secure_password
    volumes:
      - postgres_data:/var/lib/postgresql/data

volumes:
  postgres_data:

Запуск production:

docker-compose -f docker-compose.prod.yml up -d

🔒 Security для Production

  1. Изменить пароли в .env файлах
  2. Настроить HTTPS (Let's Encrypt)
  3. Настроить CORS для production домена
  4. Обновить JWT secret
  5. Настроить rate limiting

📊 Мониторинг

Health checks:

Logs:

# Посмотреть логи
docker-compose logs -f

# Логи конкретного сервиса
docker-compose logs -f frontend