FreedomClassifieds Local listings with clean design, trusted sellers, and fast moderation.

Deployment Guide

Deployment Guide

Current environment findings

Recommended production topology

Web VM steps

  1. Create database and application user in MariaDB

    CREATE DATABASE freedomclassifieds CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    CREATE USER 'freedomclassifieds'@'127.0.0.1' IDENTIFIED BY 'replace-with-strong-password';
    GRANT ALL PRIVILEGES ON freedomclassifieds.* TO 'freedomclassifieds'@'127.0.0.1';
    FLUSH PRIVILEGES;
    
  2. Copy .env.example to .env and set production values for:

    • APP_NAME
    • APP_ENV=production
    • APP_DEBUG=false
    • APP_URL=https://freedomclassifieds.com
    • DB_CONNECTION=mysql
    • DB_HOST=127.0.0.1
    • DB_PORT=3306
    • DB_DATABASE=freedomclassifieds
    • DB_USERNAME=freedomclassifieds
    • DB_PASSWORD
    • MAIL_*, POSTMARK_API_KEY, POSTMARK_MESSAGE_STREAM_ID
    • GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_REDIRECT_URI
    • CAPTCHA_PROVIDER and whichever provider secrets are selected
  3. Install dependencies and optimize autoloading

    composer install --no-dev --optimize-autoloader
    
  4. Generate the application key if needed

    php artisan key:generate
    
  5. Run the database bootstrap

    php artisan migrate --force
    php artisan db:seed --force
    
  6. Ensure storage/ and bootstrap/cache are writable by the web user

  7. Configure nginx site root to public/

  8. Point PHP requests to PHP-FPM 8.3

  9. Restart nginx and PHP-FPM

Local activation notes

Validation checklist

Endpoint notes

Use the endpoint staging pattern already used on this machine: create config files under /home/ubuntu/endpoint-fix-confs and then apply them on the endpoint host.