Get Started

IntroductionInstallation & Setup

Installation & Setup

2. Installation & Setup

2.1. Prerequisites

System Requirements

Before installing DaaS Boilerplate, ensure your system meets the following requirements:

  1. Operating System
    • Unix-based system (Linux or macOS) recommended
    • Windows with WSL2 supported
  2. Required Software
    • Docker Engine (20.10.x or higher)
    • Docker Compose (2.x or higher)
    • Node.js (18.x or higher)
    • Yarn (1.22.x or higher)
    • OpenSSL (for SSL certificate generation)

[!NOTE] ๐Ÿ“ธ Screenshot Needed: System requirements verification commands and expected output

Environment Files

The system uses several environment files for configuration:

  1. Root Directory

    • .env: Main environment configuration
    • .env.example: Template for main configuration
  2. Frontend Directory

    • frontend/.env: Frontend-specific configuration
    • frontend/.env.example: Template for frontend configuration
  3. Backend Directory

    • backend/.env: Backend-specific configuration
    • backend/.env.example: Template for backend configuration

[!NOTE] ๐Ÿ“ธ Screenshot Needed: Directory structure showing environment files

2.2. Installation Process

Repository Setup

  1. Clone the Repository

    git clone https://github.com/your-repo/daas-boilerplate.git
    cd daas-boilerplate
    
  2. Run Setup Script

    chmod +x setup.sh
    ./setup.sh
    

    The setup script performs the following actions:

    • Copies environment file templates
    • Installs dependencies
    • Generates SSL certificates
    • Initializes Docker volumes

[!NOTE] ๐Ÿ“ธ Screenshot Needed: Setup script execution and successful completion

Deployment Options

Docker Deployment (Recommended)

  1. Production Mode

    docker-compose up -d
    
  2. Development Mode

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

Direct Node.js Execution

  1. Frontend Development

    cd frontend
    yarn install
    yarn dev
    
  2. Backend Development

    cd backend
    yarn install
    yarn develop
    

[!NOTE] ๐Ÿ“ธ Screenshot Needed: Both Docker and Node.js deployment methods in action

2.3. Environment Configuration

Traefik Proxy Setup

  1. Domain Configuration

    • Edit docker/traefik/traefik.yml
    • Configure your domain in .env
    DOMAIN=your-domain.com
  2. SSL Certificates

    • Automatic Let's Encrypt configuration
    • Manual certificate placement in docker/traefik/certs/

[!NOTE] ๐Ÿ“Š Diagram Needed: Traefik proxy routing flow

Environment Variables

Key environment variables to configure:

  1. General Configuration

    NODE_ENV=production
    PORT=3000
    DATABASE_URL=postgresql://user:password@localhost:5432/dbname
  2. Security Settings

    JWT_SECRET=your-secure-jwt-secret
    ADMIN_JWT_SECRET=your-secure-admin-jwt-secret
    API_TOKEN_SALT=your-api-token-salt
  3. External Services

    STRIPE_SECRET_KEY=sk_test_...
    STRIPE_WEBHOOK_SECRET=whsec_...

[!NOTE] ๐Ÿ“ธ Screenshot Needed: Environment configuration interface or example

Post-Installation Verification

  1. Health Checks

    curl http://localhost/health
    curl http://localhost/api/health
    
  2. Service Status

    docker-compose ps
    
  3. Logs Verification

    docker-compose logs -f
    

[!NOTE] ๐Ÿ“ธ Screenshot Needed: Successful health check and service status output

๐Ÿš€

DaaSBoilerplate

Build a scalable and customer ready DaaS product

ยฉ 2025 DaaSBoilerplate. All rights reserved.

We are not associated with any person or company appearing in the database(s).

LINKS