Docker
We use docker
to develop and test our application. Because it is really easy!
Prerequisites
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
Developing
To start your development environment just run:
That's it. You will see that your development server is up and running.
Testing
To test your application run:
Production
We use GitLab CI
to build production ready docker
images.
However, we do not 100% recommend to use docker
for production in this case. Because you need to answer some questions before doing it:
Are some raw static files just fine for me? If so, just use
npm run generate
Do I really need all the complexity that comes with
docker
? If not, usenpm run start
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 itDo 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 updated