Search code examples
laraveldockerdeploymentvuejs3inertiajs

Deploy Laravel + Inertia + Vue3 app with Docker SQL Database


I am new to this stack and I just finalized my Laravel + Inertia + Vue3 app. I now have no idea how to deploy it or where, as well as how to deploy my MySQL mariadb:10.8.3 database, that runs through docker in local environment. Can you please suggest me a platform to host my app as well as how to deploy the database?


Solution

  • For the guy who found this question useful - I got you homie! I upload to Heroku by first npm run build the vue3, upload with git and for the database - I currenly use the JawsDB Maria add-on from Heroku that works like charm! Oh and do not forget to update the AppServiceProvider in laravel

    <?php
    
    namespace App\Providers;
    
    use Illuminate\Support\ServiceProvider;
    
    class AppServiceProvider extends ServiceProvider
    {
        /**
         * Bootstrap any application services.
         */
        public function boot(): void
        {
            if (config('app.env') === 'production') {
                \URL::forceScheme('https');
            }
        }
        
        /**
         * Register any application services.
         */
        public function register(): void
        {
            //
        }
    }