Local Installation

  1. Make Laravel project - make your folder and run git bash from it. After that:
composer create-project laravel/laravel project && cd project
  1. In project/composer.json
...
"repositories": [
    {
        "type": "composer",
        "url": "https://lpackages.ant-rt.com/api/[TOKEN]"
    }
]
...
"minimum-stability": "dev",
  1. In project/.env
APP_TESTING=true
APP_URL=[YOUR_URL]
TIMEZONE=Europe/Sofia

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=testing
DB_USERNAME=homestead
DB_PASSWORD=secret

FILESYSTEM_DISK=public_html
  1. Require marinar CMS
composer require --dev marinar/marinar
  1. Add project/commands_replace_env.php, if needed for special php and composer commands:
<?php
    return [
        'parts' => [
            'php' => '/opt/php-8.1/bin/php -d memory_limit=-1',
            'composer' => '/opt/php-8.1/bin/php -d memory_limit=-1 /home/test/on_server/composer.phar',
        ]
    ];

NOTE: DO NOT USE ALIASES!!!

  1. Intall marinar
php artisan db:seed --class="\\Marinar\\Marinar\\Database\\Seeders\\MarinarInstallSeeder"

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
  1. Go to project directory and add project .env file - you can use .env.example. Changes required:
cd YOUR_PATH_TO_PROJECT
  1. Install composer packages
COMPOSER_MEMORY_LIMIT=-1 composer install --no-dev
  1. Migrate the database
php -d memory_limit=-1 artisan migrate
  1. Seed DB
php -d memory_limit=-1 artisan db:seed
  1. Give storage files privileges
  1. If public_html folder is only with php8.1 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]