-
Notifications
You must be signed in to change notification settings - Fork 12
Deployment on a VPS
Chirag Gude edited this page Mar 6, 2015
·
3 revisions
Download and extract WanDisco yum repo for Git:
rpm -ivh http://opensource.wandisco.com/centos/6/git/i686/wandisco-git-release-6-1.noarch.rpm
Install Git: yum install git
cd /tmp
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
Create .env.php
file in root directory of project (where composer.json is present) - This file is included in gitignore and meant to be copied manually to Production server. This file should contain all sensitive information meant for the production server. You can also use this same technique for local development, by creating a .env.local.php
<?php
// Settings for Production Server
return [
'DATABASE_HOST' => 'insert-something',
'DATABASE_NAME' => 'insert-something',
'DATABASE_USERNAME' => 'insert-something',
'DATABASE_PASSWORD' => 'insert-something',
'APP_ENCRYPT_KEY' => 'insert-something',
'MAIL_ADDRESS' => 'insert-something',
'MAILGUN_USERNAME' => 'insert-something',
'MAILGUN_PASSWORD' => 'insert-something',
'ADMIN_EMAIL' => 'insert-something',
];
cd /home
git clone https://github.com/chiraggude/larabase.git larabase
chown -R nginx:nginx /home/larabase/.git
cd /home/larabase/app
chown -R nginx:nginx storage
cd /home/larabase/bootstrap
chown nginx:nginx compiled.php
- Never run
composer update
in production. Instead runcomposer install
- Might be good practice to commit
composer.lock
to production - Read more: https://blog.engineyard.com/2014/composer-its-all-about-the-lock-file
Add the Analytics JS code in /larabase/public/js/analytics.js