I have a mad idea


  • | 583 points

    I imagined that I can create separate environments with Laragon. Each project has a main configuration file (.lrgn or a conf.json) and that file contains like below (as if Docker).
    This configuration file makes a Procfile or something different - I dont know. It could be hyper-super laragonization. And I can select which projects I want to run.
    And they can run both - I think.

    # projects/server_01/.lrgn
    
    name: "Server 01"
    host: "it-looks-good.oo" # prevent redundancy
    
    nginx: # call nginx -p ./www -c ./nginx.conf
      version: "1.13.1"
      host # makes a configuration file and it will be including
      port: 80
      proxy: # not necessary (ex.: a node app is runnig)
        from:
          port: 3000
          host: "localhost"
      ssl: true|force # make a certification and then add it to Certification System
      setup: # https://nginxconfig.io/?file_structure=modularized
        http:
          server_tokens: on # rewrite defaults, custom settings are writable
    
    node: # runs versioned node
      version: "8.1.11"
    
    mysql: # call mysql --defaults-file=./my.ini --host=it-looks-good.oo --port=3308
      version: "5.7.21" # load mysql from versioned folder
      host
      port: 3308 # prior port scanning
      pass: "rootpass" # makes a password to the root user
      setup:
        client:
          user: "idontknow"
    
    php: # call php -c ./php.ini
      version: "7.2.4" # load php from versioned folder
      nts: false
      setup: # not necessary
        max_execution_time: 300
        smtp_port: 1025
    
    mail: # call mailhog, hmail
      port: 1025
    
    ngrok:
      host
    

  • | 6369 points

    @etyike
    I also have a mad idea, your's is about the tools and mine is about the projects created using the tools.
    Have a look at here.


  • administrators
    | 87431 points

    @etyike : I like your idea but users can use Docker & Docker Compose to achieve that.


  • | 583 points

    Yes I know. But I'm a pioneer :)
    Docker is very good tool but I dont like it


  • | 583 points

    I have a plan to visualize the assembling tools


  • | 4363 points

    I kinda like this idea (it reminds me of cPanel's MultiPHP feature, or Plesk's way to handle these kind of things per site/domain) and have few times actually hoped that there would be this kind of feature.

    Even if this wouldn't be a part of Laragon, I'd like to chime in with few observations.

    After thinking this a bit, I think there might be some problems which could cause some difficulties with implementation.

    Let's say I have 2 different projects:

    • Project 1
      • PHP 7.2
      • MariaDB 10.2
      • Nginx 1.13
    • Project 2
      • PHP 5.6
      • MySQL 5.6
      • Apache 2.4

    How would Laragon handle this kind of thing if I'm working on these projects in the same time?

    Option 1
    Laragon would load PHP 5.6 & 7.2, MySQL 5.6, MariaDB 10.2, Nginx 1.13, Apache 2.4 etc. daemons to memory? This would probably cause some conflicts and use lots of resources. This is the way cPanel and Plesk are handling these kind of situations (designed to work in this way), IIRC (with a smaller set of options to choose from).

    Option 2
    Laragon would hotswap daemons depending which site we are loading, but this would probably be very slow and inefficient way to handle this.

    Option 3
    Laragon would give you an option to choose which project is active (only 1 active project) and load daemons which are needed.

    Option 4
    Something else?

    What if I have 20 projects which all have slightly different setup? Let's say total of 6 different PHP versions, 4 different HTTP daemons, 3 different DB daemons, etc. You get the picture :)

    Option 3 would probably be the easiest way to do this, even though it would decrease Laragon's flexibility a bit.


  • | 583 points

    @Kurre Your right! But I am Weasel! :)
    Thank You for Your response


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.