This post is merely a checklist reminder for myself and not meant to be a tutorial. If you are looking for a tutorial on setting up laravel for the first time please go to:
http://www.nowordsbarred.com/setting-laravel-4-first-time-onwamp-server/
-
- install laravel 5 via composer (composer create–project laravel/laravel —prefer–dist)
- make deploy script for server (chmod +x script after uploading it)
- connect server to repo with deploy keys
- clone repo onto production server manually
- create symlink to public folder of laravel
- install composer in laravel directory
- create database
- define DB creds in .env file
Thats all the needed steps for getting a laravel siteĀ configured on the server.
1.) To allow the server to connect to the Code Base repo we need to run (cd ~/.ssh). Then run (cat id_rsa.pub) and copy the pub key file (control + insert + c to copy from terminal)ā¦ maximize the SSH terminal window if getting invalid key warning from CB, spacing seem to effect this. (If no file present run ssh-keygen). Next step is login to CB, hit the repos page, then hit the gear icon > deployment keys > ad new ssh key > past key into this window and save.
2.) When you upload your deploy script file, to give it proper permissions to execute we need to run (chmod +x script-name)
3.) To create our symlink path to the public folder we want to run:
ln -s /home/user/git/repo-name/public /home/user/public_html/public_html
or if you want to install laravel in a subfolder you can run:
ln -s /home/user/git/project/repo-name/public /home/user/public_html/directory/folder-name
**Notes**
-you must delete the public_html folder if its is already present, most systems will make this folder by default when the account is created.
-you must include the full file path, including /home/username if your are on cpanel