Dujiaoka Automated Cloud Infrastructure Platform

repository·master·Indexed 12 days ago

https://github.com/assimon/dujiaoka

A PHP-based automated cloud infrastructure and service platform. This project is deprecated as of February 12, 2026, with users advised to migrate to Dujiao-Next. Documentation includes LEMP stack installation on Debian 11, Nginx configuration, PHP 7.4 FPM setup, Docker deployment via docker-compose, and template customization for the Luna and Hyper themes.

Tokens
3.4K
Snippets
13
Records
20
Agent score
94%

What's inside Dujiaoka

  1. Configure product input fields as dropdown menus

    master

    In the Luna template, you can convert standard product input fields into dropdown selection menus by appending options to the field name using the pipe (|) character as a separator.

    Syntax: field_name[option1|option2|option3]=true

    service=所在区服[1号服务器|2号服务器|3号服务器]=true
  2. Configure Supervisor for Laravel Workers

    master

    To ensure background tasks (queues) run continuously, configure Supervisor.

    1. Install Supervisor: apt install supervisor

    2. Create a configuration file at /etc/supervisor/conf.d/dujiaoka.conf:

      [program:laravel-worker]
      process_name=%(program_name)s_%(process_num)02d
      command=php /var/www/dujiaoka/artisan queue:work
      autostart=true
      autorestart=true
      user=www
      numprocs=1
      redirect_stderr=true
      stdout_logfile=/var/www/dujiaoka/worker.log

      Note: Ensure the command, user, and log file paths match your actual installation directory and user.

    3. Start the worker:

      supervisorctl reread
      supervisorctl update
      supervisorctl start laravel-worker:*
    [program:laravel-worker]
    process_name=%(program_name)s_%(process_num)02d
    command=php /var/www/dujiaoka/artisan queue:work
    autostart=true
    autorestart=true
    user=www
    numprocs=1
    redirect_stderr=true
    stdout_logfile=/var/www/dujiaoka/worker.log
  3. Configure Nginx for Dujiaoka

    master

    Create an Nginx server block to handle requests. Ensure you update server_name, root, and SSL certificate paths to match your environment.

    Key configuration requirements:

    • Root directory: Should point to the /public subdirectory of the project (e.g., /var/www/dujiaoka/public).
    • PHP handling: Use fastcgi_pass pointing to your PHP-FPM socket (e.g., unix:/var/run/php/php7.4-fpm.sock).
    • SSL: Configure ssl_certificate and ssl_certificate_key paths.
    • Try Files: Ensure try_files $uri $uri/ /index.php?$query_string; is set for proper routing.

    After configuring, test and restart Nginx:

    nginx -t
    /etc/init.d/nginx restart
    server
        {
            listen 443 ssl http2;
            listen [::]:443 ssl http2;
            server_name domain.com ;
            index index.html index.htm index.php default.html default.htm default.php;
            root  /var/www/dujiaoka/public;
            ssl_certificate /etc/nginx/sslcert/cert.crt;
            ssl_certificate_key /etc/nginx/sslcert/key.key;
    
            location / {
                try_files $uri $uri/ /index.php?$query_string;
            }
    
            location ~ [^/]\.php(/|$) {
                fastcgi_pass  unix:/var/run/php/php7.4-fpm.sock;
                include snippets/fastcgi-php.conf;
            }
    
            location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
                expires      30d;
            }
    
            location ~ .*\.(js|css)?$ {
                expires      12h;
            }
    
            location /\.well-known {
                allow all;
            }
    
            location ~ /\.\ {
                deny all;
            }
    
            access_log off;
        }
  4. Install Composer dependencies

    master

    Install Composer locally within the project directory to manage dependencies.

    cd /var/www/dujiaoka
    php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    php composer-setup.php
    php -r "unlink('composer-setup.php');"
    mv composer.phar /usr/local/bin/composer
    
    # Run installation as a specific user
    adduser user
    su user
    composer install
    composer update
    su
  5. Remove the background image from the Luna template

    master

    To completely remove the background image, you must edit the navigation layout file and comment out or remove the background div tag.

    File Location: {your_deployment_path}/resources/views/luna/layouts/_nav.blade.php

    Action: Comment out the div tag located on the first line of the file.

    {{--<div class="background"></div>--}}
  6. Install the LEMP stack on Debian

    master

    To manually install the required environment (Nginx, MariaDB, PHP 7.4, and Redis) on Debian 11, follow these steps:

    1. Update system packages:

      apt update
      apt upgrade
    2. Install Nginx and MariaDB:

      apt install nginx
      apt install mariadb-server
    3. Secure MariaDB: Run mysql_secure_installation and follow the prompts.

    4. Create Database and User: Log into MariaDB using mariadb and execute:

      CREATE DATABASE [database_name];
      GRANT ALL ON [database_name].* TO '[username]'@'localhost' IDENTIFIED BY '[password]' WITH GRANT OPTION;
      FLUSH PRIVILEGES;
      EXIT
    5. Install PHP 7.4 and required extensions:

      apt install php php-fpm php-mysql php-gd php-zip php-opcache php-curl php-mbstring php-intl php-dom php-bcmath php-redis php-fileinfo
    6. Install Redis:

      apt install redis
    apt update
    apt upgrade
    apt install nginx
    apt install mariadb-server
    apt install php php-fpm php-mysql php-gd php-zip php-opcache php-curl php-mbstring php-intl php-dom php-bcmath php-redis php-fileinfo
    apt install redis
  7. Configure PHP 7.4 FPM for Dujiaoka

    master

    Dujiaoka requires certain PHP functions to be enabled. You must remove them from the disable_functions list in your php.ini file.

    1. Edit the configuration file: nano /etc/php/7.4/fpm/php.ini
    2. Search for disable_functions (use ctrl+w in nano).
    3. Remove the following functions from the list if they exist:
      • putenv
      • proc_open
      • pcntl_signal
      • pcntl_alarm
    4. Reload PHP-FPM to apply changes: /etc/init.d/php7.4-fpm reload