Docker
Before going any further make sure that you have
docker
installed on your machine. It comes for Mac, Linux, and Windows.Minimal versions:
docker
:18.02
docker-compose
:1.20
To start your development environment just run:
docker-compose up
That's it. You will see that your development server is up and running.
To test your application run:
docker-compose run --rm vue npm run test
However, we do not 100% recommend to use
docker
for production in this case. Because you need to answer some questions before doing it:- 1.Are some raw static files just fine for me? If so, just use
npm run generate
- 2.Do I really need all the complexity that comes with
docker
? If not, usenpm run start
- 3.Can I deploy my application to some 3rd-party services? Like:
now.sh
,gh-pages
,heroku
or so on. If so, do not hesitate to do it - 4.Do I really need to scale my server-side rendering? If not, use
npm run start
All in all: if you have some complex private frontend with server-side rendering and complex infrastructure, then you might need
docker
.Last modified 4yr ago