Pandastack Documentation
  • Welcome
  • Getting Started
    • Quickstart
      • Getting Started
    • Projects
      • Static Website
        • Configure your static website
          • Pre-defined ENV for static websites
      • Conatinered Website
        • How to configure nodejs project
        • How to Configure Python projects
        • How to Configure GO project
        • Docker runtime Projects
        • Private Connection with database.
        • Override default ENV
    • Databases
      • MySQL
      • PostgreSQL
      • Redis
      • MongoDB
      • TimeScaleDB
    • Monitoring
      • Uptime Check
      • SSL monitoring
      • Monitors pricing
    • Analytics
    • SSO
      • Google
      • Azure
    • Managed Apps
      • Wordpres
      • Directus
      • Strapi
      • Consul
      • Jenkins
    • PandaEdge
      • Deploy a nodejs function
      • Deploy a python function
      • Panda Edge pricing
Powered by GitBook
On this page
  • Features
  • Basic Features
  • Advanced Features
  • Deployment Steps
  • 1. Connect Repository
  • 2. Configure Build
  • 3. Deploy Website
  • URL Management
  • Redirect Rules
  • Rewrite Rules
  • Rule Management
  • HTTP Headers
  • Custom Headers
  • Common Use Cases
  • Environment Management
  • Environment Variables
  • Secret Management
  • Best Practices
  • 1. Build Configuration
  • 2. URL Management
  • 3. Headers
  • 4. Performance
  • Troubleshooting
  • 1. Build Issues
  • 2. URL Issues
  • 3. Header Issues
  • 4. Performance Issues
  • Security
  • 1. SSL/TLS
  • 2. Access Control
  • 3. Headers
  • Monitoring
  • 1. Build Status
  • 2. Website Status
  • 3. Security Status
  1. Getting Started
  2. Projects

Static Website

This guide walks you through deploying and managing static websites on PandaStack Platform.

Features

Basic Features

  • Static file hosting

  • Custom domains

  • SSL/TLS certificates

  • Auto deployment from Git

  • Build automation

  • Environment variables

Advanced Features

  1. Custom HTTP Headers

    • Cache control

    • Security headers

    • Custom response headers

    • Path-specific headers

  2. URL Management

    • URL redirects

    • URL rewrites

    • Wildcard patterns

    • Rule prioritization

Deployment Steps

1. Connect Repository

  1. Choose Git Provider:

    • GitHub

    • GitLab

    • Bitbucket

  2. Select Repository:

    • Choose repository

    • Select branch

    • Configure access

2. Configure Build

  1. Basic Settings:

    • Project name

    • Repository branch

    • Auto-deploy settings

  2. Build Configuration:

    # Base Directory (Optional)
    ./frontend
    
    # Build Command
    npm run build
    
    # Output Directory
    build/
  3. Environment Variables:

    • Add key-value pairs

    • Import from .env file

    • Secure sensitive data

3. Deploy Website

  1. Initial Deployment:

    • Automatic build

    • Asset optimization

    • SSL provisioning

  2. Verify Deployment:

    • Check build logs

    • Test website

    • Monitor status

URL Management

Redirect Rules

{
    "source": "/old-page",
    "destination": "/new-page",
    "type": "redirect"
}

Rewrite Rules

{
    "source": "/api/*",
    "destination": "/api/v2/*",
    "type": "rewrite"
}

Rule Management

  • Order rules by priority

  • Move rules up/down

  • Enable/disable rules

  • Test rule patterns

HTTP Headers

Custom Headers

{
    "name": "Cache-Control",
    "value": "public, max-age=3600"
}

Common Use Cases

  1. Cache Control:

    {
        "name": "Cache-Control",
        "value": "public, max-age=3600"
    }
  2. Security Headers:

    {
        "name": "Content-Security-Policy",
        "value": "default-src 'self'"
    }
  3. CORS Headers:

    {
        "name": "Access-Control-Allow-Origin",
        "value": "*"
    }

Environment Management

Environment Variables

  1. Direct Input:

    API_URL=https://api.example.com
    FEATURE_FLAG=true
  2. File Import:

    # .env file
    API_KEY=your-api-key
    DEBUG=false

Secret Management

  • Secure storage

  • Environment separation

  • Access control

  • Version tracking

Best Practices

1. Build Configuration

  • Use proper base directory

  • Optimize build command

  • Configure output path

  • Handle dependencies

2. URL Management

  • Order rules properly

  • Use specific patterns

  • Test redirects

  • Monitor traffic

3. Headers

  • Set security headers

  • Configure caching

  • Use appropriate values

  • Test header effects

4. Performance

  • Optimize assets

  • Configure caching

  • Use CDN

  • Monitor metrics

Troubleshooting

1. Build Issues

  • Check build command

  • Verify dependencies

  • Review build logs

  • Check resource limits

2. URL Issues

  • Test redirect rules

  • Verify patterns

  • Check rule order

  • Monitor traffic

3. Header Issues

  • Verify header syntax

  • Test header effects

  • Check conflicts

  • Monitor responses

4. Performance Issues

  • Review caching

  • Check asset sizes

  • Monitor load times

  • Analyze metrics

Security

1. SSL/TLS

  • Automatic certificates

  • Custom certificates

  • Force HTTPS

  • Security headers

2. Access Control

  • Repository access

  • Environment variables

  • Secret management

  • Role permissions

3. Headers

  • Security headers

  • CORS configuration

  • Content security

  • Frame options

Monitoring

1. Build Status

  • Build logs

  • Deployment status

  • Error tracking

  • Performance metrics

2. Website Status

  • Uptime monitoring

  • Response times

  • Error rates

  • Traffic analysis

3. Security Status

  • SSL monitoring

  • Security headers

  • Access logs

  • Threat detection

PreviousProjectsNextConfigure your static website

Last updated 3 months ago