Laragon feature: Procfile - What is it?
You can read about Procfile here at Heroku: https://devcenter.heroku.com/articles/procfile
However, Laragon makes Procfile more convenient to use with GUI. On Laragon all processes on Procfile will be displayed on Menu > Laragon
Some other differences on Laragon are:
- A process name can have spaces. For example: My Cool App
- You can add
autorunto make the process auto triggered when Laragon starts
- You can hide (don't show Console) a process if you quote its command. For example: "php artisan serve"
- You can set PWD=xxx - xxx is Path of current processs
- You can have env_file=yyy - yyy is Path to your Environment File.
Here is format of a Procfile:
# Format: ; Program Name: autorun COMMANDS env_file=PATH_OF_FILE pwd=PATH_OF_WORKING_DIR ENV_VAR1=VALUE ENV_VAR2="VALUE WITH SPACE" # Help: ; Program Name: Will be displayed on Procfile or Tools' Menu (can contains space) ; autorun: Your COMMANDS will be run automatically when Laragon starts ; COMMANDS: A command or a series of commands (separated by & ) ; env_file: You can set environment variables directly or put them to the file ; PWD: Current working directory - where the COMMANDS run # Examples: ; My Cool App: autorun node start $PORT PORT=9000 env_file=usr\my_file.env PWD=usr/proj/myapp DB_HOST=188.8.131.52 DB_PORT=9999 DB_USER=user DB_PASS="!$Ab.cs3cre1" DB_NAME=cooldb ; Awesome Tool: "PATH HAS SPACES SHOULD BE QUOTED LIKE THIS" ------------------------------------------------------------------------------
- pwd is case-insensitive.
- autorun is case-insensitive.
- Your env_file may look like this:
VAR1="VALUE WITH SPACE" DB_HOST=184.108.40.206 DB_PORT=9999 DB_USER=user DB_PASS=!$Ab.cs3cre1
can I make the lines below merge in one line - I see, that the commands can be with the & sign separatable, but I can't do it?
# Procfile ; Run Laravel Test proxy pass backend: autorun "php artisan serve" PWD=C:\laragon\www\test-proxy-pass\backend ; Run Nuxt.js Test proxy pass frontend: autorun "yarn dev" PWD=C:\laragon\www\test-proxy-pass\frontend
Thank You for Your response!
@etyike : It's a nice video.
Are you the author of the video?
PHP & Node.js processes are running on two different directories, so you should use 2 lines.
Thanks, this was my tip. Yes, I do, I hope is everything ok with it, it's only a very short example! I remove it if it's necessary
How to show icons by new added Tools menu items ?
@Stagger-Lee : Laragon will get the icon from the exe file automatically.
I added EmEditor Portable and no icon there. Restarted Laragon (exe) many times.
@Stagger-Lee use the command line and the icons will be unnecessary - Occam's razor