Skip to main content

Server

Server Setup

The Flux CRM system is hosted on a DigitalOcean server, managed by Laravel Forge, which automates the deployment and server management process.

Server Details

  • Hosting Provider: DigitalOcean
  • Server Type: Managed VPS with auto-scaling capabilities.
  • Operating System: Ubuntu (or specify the OS version).

Laravel Forge

The server is managed through Laravel Forge, which handles the following:

  • Provisioning: Laravel Forge sets up the server, installs the necessary software (e.g., Nginx, PHP), and configures the server environment.
  • Automated Deployments: Forge is integrated with the project’s Bitbucket repository. Every time code is pushed to the master branch, a deployment script is triggered, and the new code is deployed to the server.
  • SSL Certificates: Managed by Forge using Let's Encrypt, ensuring secure data transmission.
  • Server Monitoring: Laravel Forge provides monitoring tools to check the health of the server, including CPU usage, memory, and disk space.

Deployment Process

The deployment process follows these steps:

  1. Code changes are pushed to the Bitbucket repository.
  2. Forge detects the changes and triggers the deployment process.
  3. During deployment, Forge runs the following scripts:
    • Pull the latest changes from the repository.
    • Run composer install to update PHP dependencies.
    • Run npm install and npm run prod to build frontend assets.
    • Migrate the database with php artisan migrate.
  4. The server is restarted, and the new version of the application is made live.

Backups and Monitoring

  • Daily Backups: Laravel Forge performs daily database backups, which are stored on the same DigitalOcean server.
  • Monitoring: Forge provides integrated monitoring for server resources such as CPU, memory, and disk usage, which allows administrators to keep track of server health.