Laravel elixer for version control (cache-bitter) of several servers

At the moment, we have a new server environment with several servers, so the laravel elixer cache override function does not work if we load the repository and run gulp, since each server has a different version of .js and .css.

The problem is load balancing, which can send the user to any server for each request. Some browsers seem to be immune to this problem, but, for example, I cannot load CSS or js correctly using JMeter to test the load.

Is there a way to synchronize the assembly without adding compiled files to the repository or FTP server?

We are trying to automate the deployment by running a script that pulls the last repo every time the productiosn branch is updated.

+7
php laravel laravel-elixir gulp
source share
1 answer

I think the only solution to this problem is to compile assets files.

At first I found this solution strange because, for example, we do not have a vendor version.

But in the end, I found that most front-end projects always send a dist folder with compiled files.

Thus, you will need to commit your build folder to your public path each time you make changes to the asset file.

Of course, do not forget to do gulp --production before clicking to minimize your files.

+4
source share

All Articles