I am trying my absolute best to work with Laravel/Sail/Docker but it is just not working out for me. I have experienced more frustration than I have completed work. I have finally come across a hurdle that I just can't get by. I have to put this Laravel framework down for now and hope that my frustration can let me concentrate and get back into creating again.
For starters. I can only work on projects on my laptop. When I try to work with an existing project on my desktop (after creating and working on it with my laptop), I can never get it to work.
- I clone the project into Ubuntu 20 distro using WSL2.
- I use the following:
docker run --rm
-u "$(id -u):$(id -g)"
-v $(pwd):/opt
-w /opt
laravelsail/php80-composer:latest
composer install --ignore-platform-reqs
- I make sure my env file (from the laptop) is copied to the desktop.
- I run Sail up -D
Results:
WARN[0000] The FORWARD_DB_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_REDIS_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_MEILISEARCH_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_MAILHOG_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_MAILHOG_DASHBOARD_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_DB_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_REDIS_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_MEILISEARCH_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_MAILHOG_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_MAILHOG_DASHBOARD_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_DB_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_REDIS_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_MEILISEARCH_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_MAILHOG_PORT variable is not set. Defaulting to a blank string.
WARN[0000] The FORWARD_MAILHOG_DASHBOARD_PORT variable is not set. Defaulting to a blank string.
I HAVE TRIPPLE CHECKED AND THE PORTS ARE ON THE ENV FILE SO I DON'T UNDERSTAND WHY IM GETTING THIS MESSAGE!!!!!!!!
All ports are listed in the ENV file. ALL OF THEM.
I searched online and I don't find anything that helps resolve the issue. If I do find anything, it is not written clearly enough for me to understand it. I'm posting here because this is where I learn the most.
I need to understand why is it so difficult to work on one project on 2 different computers when it comes to Laravel / Sail / Docker?
FYI: Sail is not even a category to select from so I can post this. I wonder if this solution is even worth it.