By Sheldon L | Published at 2020-09-11 | Updated at 2020-09-11 |
Use Laravel Forge to Automate Web-Server Creation on a Linode
Setup VPS API Key and integrate Github.
Save the password when provisioning. When server is created, you can edit server details in dashboard, and add new site according your language and framework.
Add ssh key to server, then push project to github, then from github to the server.
You can visit the site with IP address (Forge) or create test link (Ploi).
Install SSL (Need set up DNS register, DNS server, and enable SSL in advance), and you can visit your custom domain.
You can create multi site on the same server.
mysqld
, Only Need to Connectssh forge@45.79.68.154
mysql -uforge -p # password is in the evironment setting in site details
> use databaseName;
> select database();
> show tables;
cd siteLocation
php artisan migrate
If use Froge, you can use SequalPro derectly
If use Ploi, install phpMyadmin in the ploi manage dashboard
If use command line remotely, read more in https://sheldonldev.github.io/2020/10/22/00.html
php artisan tinker
$admin = new App\Admin
$admin->name = 'Admin'
$admin->email = '***@***'
$admin->password = Hash::make('******')
$admin->save()
exit
php artisan storage:link
.env
LOCALE = "cn"
APPNAME = "Land View"
composer install
npm install && npm run prod
Stop CDN proxy
Click SSL in site panel, use LetsEncrypt.
Now can visit the domain and restart CDN proxy.