D
D
DieZz2015-10-27 14:24:09
git
DieZz, 2015-10-27 14:24:09

How to properly deploy an application on Laravel using Git?

Good day. There is an application written in laravel located on dev.machine. I use GIT as a hard currency, and the remote repository is located on bitbucket.org.
In .gitignore I have:

*.env
storage\
vendor\
output\

Now I'm doing this: on the prod.mashine server, I'm doing a git clone. Next, in the directory with the application, I execute composer update, bower install, etc. As a result, the application does not start, various kinds of errors appear, for example:
ReflectionException in Container.php line 779:
Class encrypter does not exist

I would like to deploy the application from the master branch to prod.mashine and further update it using git pull and bash scripts. Tell me how to properly organize the deployment of the application, and what I'm doing wrong.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Osher, 2015-10-27
@DieZz

I am using mine .
Here is my config/deploy.rb .
The workflow is:
- commit and push all changes to bitbucket
- execute mina deploy
- ...
- PROFIT

V
Vyacheslav Plisko, 2015-10-27
@AmdY

it is better to install the composer from the lock file via composer insatall, without update, so that the versions match, otherwise you never know in new regressions.
because If you don't have .env on the server then you don't have a key for encrypter. you need to create a .env file and run
php artisan key:generate
and set the webserver write permissions to storage and bootstrap/cache
laravel.com/docs/5.1#installation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question