k2so-dev / laravel-nuxt

Laravel and Nuxt.js boilerplate designed for development with maximum API performance, ready-made authorization methods, image uploading with optimization, user roles, device management
MIT License
143 stars 25 forks source link

Forge deployment #2

Closed martin-ro closed 7 months ago

martin-ro commented 7 months ago

Hi,

thanks for this great starter package. I've been playing around with it locally.

Would you mind explaining how to deploy this setup with forge? As this is a monolith how'd you run octane and also serve the frontend with nuxt?

Cheers

k2so-dev commented 7 months ago

@martin-ro Hello. Unfortunately, I have no experience with laravel forge, but I can assume that it is necessary to create 2 proxy web servers separately for Laravel and for Nuxt.js. For example, Laravel on the api.example.com subdomain proxies 127.0.0.1:8000, and Nuxt on example.com proxies 127.0.0.1:3000.

I hope I somehow helped in solving the problem.

martin-ro commented 7 months ago

What tripped me up was that forge will hide the Octane & Horizon toggles when the path is set to dist. Other than that I think I got it mostly working. Thanks.