aschmelyun / fleet

Run multiple Laravel Sail websites locally with custom domain names and https
MIT License
314 stars 13 forks source link

running sail yarn dev does not work #10

Open rockblings opened 1 year ago

rockblings commented 1 year ago

After running the sail up, and tried to run sail yarn dev to build my vite. it couldnt find the container.

hobbito commented 1 year ago

Happened the same to me with all the commands.

joseph-d commented 10 months ago

You need to add the new name to your application's .env file under a new APP_SERVICE key like this:

APP_SERVICE=my-app-localhost

After that, you'll be able to run things like sail yarn dev or sail npm run dev again.

Take care when setting the APP_SERVICE as it is not the domain name, but the service name from your docker_compose.yaml file which will use a dash and not a dot.

timyourivh commented 8 months ago

You need to add the new name to your application's .env file under a new APP_SERVICE key like this:

APP_SERVICE=my-app-localhost

After that, you'll be able to run things like sail yarn dev or sail npm run dev again.

Take care when setting the APP_SERVICE as it is not the domain name, but the service name from your docker_compose.yaml file which will use a dash and not a dot.

Also, if you run multiple Vite projects you should set a different port for each Vite project as well by setting VITE_PORT in your .env file(s):

# second_app/.env

VITE_PORT=5174 # Default is 5173