Deploy and upgrade quasar app
Hi all !
I want to know what is the best way to upgrade my quasar application (SPA) in production.
When I finished my dev with “quasar dev” I use “quasar build” to pack my application in dist folder.
- Do I need to delete old dist folder before build ?
- How can be sure my users have the latest version of my app in the cache ?
Wich process do you use guys for your apps ?
I use quasar 0.13
The old dist folder is automatically deleted when a new build is started.
Also, the generated webpack bundle uses cache busting techniques, like appending a hash value to the filename, so you shouldn’t have to worry too much about caching issues.
So when it comes to deploying your app, there are different ways a achieve this. Because Quasar/Vue.js projects are just static files most of the time, you can just replace the old files with the new files on your server.
- You could use Github hooks to receive new commits, build them on your build server and then deploy them to your server,
- You could use a continuous integration service
- You could have a little script on your local machine, that runs the build command, and then transmits the new build files to your server via SSH
Most of the times, you do not want to build your files on your production server, because then you need to install the whole toolchain, make sure, only authorized users could use the tools, protect your source, you have additional load on your server, find a way to deploy without downtime when building.
Here is an older blog post that gives an overview over some of the solutions I mentioned above:
Thanks @a47ae for this complete and usefull reply !!