E
E
Eugene2020-10-19 09:56:43
Laravel
Eugene, 2020-10-19 09:56:43

Am I deploying the Laravel site correctly?

Hello!

There is a simple shared hosting, no SSH access, ISPmanager panel on the hosting, no command line. And there is a site on Laravel on the local server.
Am I deploying correctly? (not in the sense of the tools used, but in the sense of technical correctness)

Set up synchronization of the remote server with the local one in PHP Storm.

1. In the .env file I change:
APP_ENV=production
APP_DEBUG=false
database connection parameters

2. Then I execute the following commands on the local server:
php artisan cache:clear

composer install --optimize-autoloader --no-dev

npm install
npm run production

php artisan config:clear
php artisan route:clear
php artisan view:clear

php artisan config:cache
php artisan route:cache
php artisan view:cache

3. And in PHP Storm I click "Synchronize"
Added only .env to synchronization exceptions

Didn't forget anything? Did everything right?
Is there any other way to do this under the current conditions? Because it's time consuming and tired already for the second time ...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sanes, 2020-10-19
@Sanes

No SSH access, ISPmanager panel is hosted

Via scheduler or ssh2_exec

P
pLavrenov, 2020-10-27
@pLavrenov

php artisan optimize:clear
Replaces 4 of your commands.
php artisan queue:restart
Resets the task cache
service supervisord restart
restarts the supervisor (any)
php artisan horizon:pause
php artisan horizon:continue
stop and start Horizon (Careful if run in dev mode, the dev config will start, this can lead to accumulation and not executing tasks)
php -d memory_limit=3G /usr/local/bin/composer update
top command for taming thick packages like dump-server
Add storage, vendor, node_modules to synchronization exceptions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question