'What is Laravel Sail's HMR_PORT in Docker
I'm learning docker, trying to build an environment: Two Laravel Sail project, with Nginx Proxy Manager.
This is the video I'm watching. I labeled the time: https://www.youtube.com/watch?v=N3uVU7To2Bc&t=192s To quickly understanding my problem, not necessary to watch it.
.env in Project1:
APP_PORT=48080
FORWARD_DB_PORT=43306
FORWARD_REDIS_PORT=46379
FORWARD_MEILISEARCH_PORT=47700
FORWARD_MAILHOG_PORT=41025
FORWARD_MAILHOG_DASHBOARD_PORT=48025
.env in Project2:
APP_PORT=58080
FORWARD_DB_PORT=53306
FORWARD_REDIS_PORT=56379
FORWARD_MEILISEARCH_PORT=57700
FORWARD_MAILHOG_PORT=51025
FORWARD_MAILHOG_DASHBOARD_PORT=58025
When I do sail up -d for project 2, it keeps saying that 8080 is allocated!! WHO USES 8080 ??? Then I found the place:
project1/docker-compose.yml
project2/docker-compose.yml
ports:
- '${APP_PORT:-80}:80'
- '${HMR_PORT:-8080}:8080'
What is HMR_PORT? I did some googling, but not quite understanding. Does it something to do with vue? What's it used for? Can I delete the line?
Solution 1:[1]
I wondered the same thing. I think it is for Hot Module Replacement https://github.com/laravel-mix/laravel-mix/blob/master/docs/hot-module-replacement.md
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Rich Standbrook |