Skip to content

Latest commit

 

History

History
93 lines (71 loc) · 2.27 KB

RUNBOOK.md

File metadata and controls

93 lines (71 loc) · 2.27 KB

Local Installation Runbook

Instructions for deploying the Digital Sovereignty Readiness Assessment without Docker, using PHP and a web server directly.

For the preferred Docker-based setup, see the main README.

Prerequisites

  • PHP 8.1 or higher
  • Apache or Nginx web server
  • Composer (for dependency management)

Local Installation

  1. Clone the repository:

    git clone https://github.com/Sinar/dsra.git
    cd dsra
  2. Install dependencies:

    composer install --no-dev --optimize-autoloader

    Note: If you encounter a "composer.lock does not contain valid JSON" error, the lock file may have been corrupted during file transfer. Fix it by running:

    rm composer.lock
    composer install --no-dev --optimize-autoloader
  3. Set file permissions:

    # Set ownership (adjust user/group for your system)
    sudo chown -R apache:apache /var/www/html/dsra
    
    # Set directory permissions
    sudo chmod 755 /var/www/html/dsra
    sudo chmod 775 /var/www/html/dsra/logs
    
    # Set file permissions
    find /var/www/html/dsra -type f -exec chmod 644 {} \;
  4. Configure web server: See Web Server Configuration in the main README for Apache and Nginx setup examples.

  5. Access the application:

    http://your-server/dsra
    

Troubleshooting

Issue: Permission denied errors

sudo chown -R apache:apache /var/www/html/dsra
sudo chmod 755 /var/www/html/dsra
sudo chmod 775 /var/www/html/dsra/logs

Issue: Composer dependencies not found

cd /var/www/html/dsra
composer install --no-dev --optimize-autoloader

Issue: Sessions not persisting

sudo chmod 1733 /var/lib/php/session  # For RHEL/CentOS
sudo chmod 1733 /var/lib/php/sessions # For Debian/Ubuntu

Issue: PDF generation fails

composer show dompdf/dompdf
composer install --no-dev --optimize-autoloader

Logging

# View recent logs
tail -f /var/www/html/dsra/logs/app.log

# Search for errors
grep ERROR /var/www/html/dsra/logs/app.log

# View web server logs
tail -f /var/log/httpd/error_log    # Apache (RHEL/CentOS)
tail -f /var/log/apache2/error.log  # Apache (Debian/Ubuntu)
tail -f /var/log/nginx/error.log    # Nginx