Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

Laravel 11 Full Course 2025: Deploy to Live Server [Lesson #13]

Автор: codingoblin

Загружено: 2025-01-12

Просмотров: 584

Описание:

In this video we are going to deploy our Laravel Jetstream with Vue and Inertia.js we application to a live server.

Steps
Create free hosting account
The first thing we need to do is create a free account with Cloudways (https://platform.cloudways.com/signup.... Use code GOBLIN for a discount if you decide to upgrade your account. Once you have your account setup you need to create a server and then create a new Laravel application on the server. If you get a warning about the size of your server, do not worry, this can be changed later if needed.

Link application to Github
Now we need to link our new application to our Github repository. This is done by heading to the "Deployment via GIT" and clicking "Generate SSH Key". Once the key has been generated, copy it and head to your Github repository. In your Github repository head to "Settings" then "Deploy Keys". Click "Add deploy key" then give your key a name and paste your key into the key input. Do not check the "Allow write access" checkbox as we only want to pull the code. Finally click "Add key" to store the key in your Github repository. Copy your SSH address from your Github repository then head back to your Cloudways application. Paste the SSH address into the "GIT remote address" input then click "Authenticate". Select your main branch from the branch dropdown. In the video we do not click "Start Deployment" yet but you are free to do this now.

SSH into Live Server
We now want to SSH into our server. Take a note of your database username on the Access Details tab then Head to your server dashboard. From the Master Credentials page click the "Launch terminal" button then login using the details on the Master Credentials page. Navigate to your application in the terminal.

SFTP into Live Server
From your application on Cloudways, create a new SFTP user. Now open Filezilla (https://filezilla-project.org/) and use your SFTP user credentials to login. Navigate through the folders to the migrations directory. We now want to delete any migrations that are not present in our project - simply look in your local Laravel project to check which migrations belong there.

Install Composer & npm
Head back to the SSH terminal and run the following commands:

composer install
npm install

If you get an error at this point saying you are using the wrong version of PHP - head to the "Settings & Packages" tab in your server, then go to "Packages" and change the PHP version to 8.3. Then run the "composer install" command again on your server.

Change .env file on Server
Head back to Filezilla and navigate to the .env file on your server. Open this file. We now want to update this .env file with the database credentials found in our Cloudways application "Access Details" tab. These are:

DB_DATABASE
DB_USERNAME
DB_PASSWORD

We can also add our mail (https://www.postmarkapp.com/?via=codi...) configurations while we are here. These are:

MAIL_MAILER
FROM_ADDRESS
POSTMARK_TOKEN

Save the file and upload it back to your server.

Running Database Migrations
Head back to the SSH terminal and run "php artisan migrate". This will create our database tables.

Adapt Roles & Permissions Seeder
We need to change our roles & permissions seeder to also create our admin user. We do this by using the CreateNewUser class. Once we have created this new user in the seeder, assign the admin role to them. Push our updated local repository to your remote Github repository then pull this code from Github to your Cloudways application. Now head back to the SSH terminal and run the seeder by running either:

php artisan migrate:fresh --seed --seeder=RoleSeeder (this will drop all existing database tables and run the migrations again also)
php artisan db:seed --class=RoleSeeder

You should now be able to login with the user created in your seeder! You can now test that everything is working as expected by navigating through the pages of your Laravel web app.

Table of contents
00:00 - Welcome back
00:10 - Create free hosting account
00:29 - Create a new server
00:57 - Create new application
02:36 - Link server to Github repository
04:46 - SSH into server
08:14 - Pull code from Github to server
08:32 - Migration issue to look put for
09:09 - Create SFTP user on Cloudways
10:48 - Delete troublesome migrations
12:40 - Install composer & npm on server
13:08 - What to do if you get php version error
14:43 - Add database details to .env on server
16:16 - Add email configurations to .env on server
17:31 - Running database migrations on live server
18:40 - Adapting roles seeder to create admin user
22:56 - Running seeder on live server
23:20 - Testing that Laravel is running correctly

Cloudways (Free trial no card required)
Use code GOBLIN for 20% off for 2 months if you upgrade
https://platform.cloudways.com/signup...

How to create server in Cloudways
   • From No Website to Live Website in 10 minu...  

Laravel 11 Full Course 2025: Deploy to Live Server [Lesson #13]

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Laravel 11 Full Course 2025: Using your own Domain & Installing SSL Certificate [Lesson #14]

Laravel 11 Full Course 2025: Using your own Domain & Installing SSL Certificate [Lesson #14]

Даже Мужики Так Не Рубятся! Вундеркинд Муай-тай в ММА - Смила Сандел

Даже Мужики Так Не Рубятся! Вундеркинд Муай-тай в ММА - Смила Сандел

Уборщик с ФЕЙК ШВАБРОЙ 32КГ Пранкует ЗАПАД | Gym Prank

Уборщик с ФЕЙК ШВАБРОЙ 32КГ Пранкует ЗАПАД | Gym Prank

Сисадмины больше не нужны? Gemini настраивает Linux сервер и устанавливает cтек N8N. ЭТО ЗАКОННО?

Сисадмины больше не нужны? Gemini настраивает Linux сервер и устанавливает cтек N8N. ЭТО ЗАКОННО?

Обращение к Президенту Путину, подлог в Госдуме Федерального масштаба!

Обращение к Президенту Путину, подлог в Госдуме Федерального масштаба!

NotebookLM: Таблицы из всего. 4 Способа применения

NotebookLM: Таблицы из всего. 4 Способа применения

Полный курс Laravel 11 2025: роли и разрешения Spatie [Урок № 9]

Полный курс Laravel 11 2025: роли и разрешения Spatie [Урок № 9]

Катастрофа, которая нас (возможно) ждёт [Veritasium]

Катастрофа, которая нас (возможно) ждёт [Veritasium]

Как в 1С не остаться на уровне новичка в 2026 году?

Как в 1С не остаться на уровне новичка в 2026 году?

Арестович: Почему Трамп дает еще один шанс Зеленскому? Дневник войны.

Арестович: Почему Трамп дает еще один шанс Зеленскому? Дневник войны.

Deploy Laravel on Ubuntu Apache server

Deploy Laravel on Ubuntu Apache server

Is Laravel Cloud Really The EASIEST Way to Deploy in 2025?

Is Laravel Cloud Really The EASIEST Way to Deploy in 2025?

Почему Азовское море — самое опасное в мире

Почему Азовское море — самое опасное в мире

Программируем с ИИ в VS Code - БЕСПЛАТНО! Сможет каждый!

Программируем с ИИ в VS Code - БЕСПЛАТНО! Сможет каждый!

Курс: Docker за 180 минут | Обучение и практика с нуля

Курс: Docker за 180 минут | Обучение и практика с нуля

КРОССОВЕР ПОКОРИВШИЙ МИР - BMW X5

КРОССОВЕР ПОКОРИВШИЙ МИР - BMW X5

Обзор типичного ФИШИНГОВОГО сайта

Обзор типичного ФИШИНГОВОГО сайта

⚡️АСЛАНЯН: ЭТО ВИДЕО РВЁТ интернет! Путина СПАЛИЛИ на камеру. СРОЧНЫЙ УКАЗ по

⚡️АСЛАНЯН: ЭТО ВИДЕО РВЁТ интернет! Путина СПАЛИЛИ на камеру. СРОЧНЫЙ УКАЗ по "СВО". Теперь всё ясно

Быстрое и дешевое развертывание приложений Laravel

Быстрое и дешевое развертывание приложений Laravel

Камеди клаб |[НОВЫЙ 2025][full HD]Сборник избранных смешных и юмористических эпизодов | часть 18

Камеди клаб |[НОВЫЙ 2025][full HD]Сборник избранных смешных и юмористических эпизодов | часть 18

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]