Local Installation

  1. Clone project
git clone ssh://lpackages@193.93.255.240/home/lpackages/marinar.git YOUR_PROJECT
  1. Change directory
cd YOUR_PROJECT
  1. Remove marinar project git
rm -rf .git
  1. Change directory to project
cd project
  1. Make project .env file - you can use .env.example. Changes required:
  1. Install all project composer packages
COMPOSER_MEMORY_LIMIT=-1 composer install
  1. Generate new project key
php -d memory_limit=-1 artisan key:generate
  1. Migrate the database
php -d memory_limit=-1 artisan migrate
  1. Install all modules, addons and plugins
php -d memory_limit=-1 artisan marinar:package
  1. Add Super Admin
php -d memory_limit=-1 artisan db:seed --class=\\MarinAdminSeeder 
  1. Add modules sorting by user roles
php -d memory_limit=-1 artisan db:seed --class=\\ModulesSeeder 
  1. If you want you can seed with test data - this will initiate seeders from modules, addons and plugins
php -d memory_limit=-1 artisan db:seed --class=\\TestDataSeeder
  1. Give storage files privileges

Production

  1. SSH to server - example
ssh lpackages@193.93.255.240
  1. Create bash GIT repository
git init --bare YOUR_PROJECT.git
  1. Put post-receive GIT hook and give privileges to it (for sync to public_html folder) - example content
GIT_WORK_TREE=/home/lpackages git checkout -f
GIT_WORK_TREE=/home/lpackages/public_html git checkout -f
  1. From LOCAL add and push to remote repository - example
git remote add production ssh://lpackages@193.93.255.240/home/lpackages/YOUR_PROJECT.git 
git push production master
  1. Install composer
curl -sS https://getcomposer.org/installer | php -- --install-dir=bin
cd YOUR_PATH_TO_PROJECT
cd ~
mkdir bin
curl -sS https://getcomposer.org/installer | php -- --install-dir=bin install
alias composer="/opt/cpanel/ea-php72/root/usr/bin/php ~/bin/composer.phar"
  1. Go to project directory and add project .env file - you can use .env.example. Changes required:
cd YOUR_PATH_TO_PROJECT
  1. Make ssh keys and authorize in Turshia
ssh-keygen
  1. Install composer packages
COMPOSER_MEMORY_LIMIT=-1 composer install

Note: Some PECL plugins may need to be installed

  1. Migrate the database
php -d memory_limit=-1 artisan migrate
/opt/cpanel/ea-php72/root/usr/bin/php -d memory_limit=-1 artisan migrate
  1. Seed DB for modules, addons and plugins - not required, because of auto installation
php -d memory_limit=-1 artisan marinar:package
/opt/cpanel/ea-php72/root/usr/bin/php -d memory_limit=-1 artisan marinar:package
  1. Add Super Admin
php -d memory_limit=-1 artisan db:seed --class=\\MarinAdminSeeder 
/opt/cpanel/ea-php72/root/usr/bin/php -d memory_limit=-1 artisan db:seed --class=\\MarinAdminSeeder 
  1. Add modules sorting by user roles
php -d memory_limit=-1 artisan db:seed --class=\\ModulesSeeder 
/opt/cpanel/ea-php72/root/usr/bin/php -d memory_limit=-1 artisan db:seed --class=\\ModulesSeeder 
  1. Give storage files privileges
  1. If public_html folder is only with php7.2 add .htaccess to ~/public_html
    and put in it:
#FOR HTTPS redirect
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

RewriteRule .* - [E=BASEDIR:/public_html]
RewriteRule ^(.*)$ %{ENV:BASEDIR}/$1 [L,QSA]