vue-storefront-api
vue-storefront-api copied to clipboard
Improved Docker Setup
Similar improvment from the vsf-app pr #4102
Add to docker-compose.nodejs-alt.yml and docker/vue-storefront-api-alt as alternative non breaking docker setups.
Short Description and Why It's Useful
- Be in line with the docker way,
- separate out the
kue workerandapistart commands into their own services via environment variableAPI_MODEwith options forapiando2mand falls back toyarn start, in thedocker/vue-storefront-api-alt/vue-storefront-api.sh - Build source inside the image instead
- Use docker to cache builds for faster startups
- Scale via containers instead of pm2 and
ecosystem.json - add docker healthcheck script to check
localhost:8080/apiif api is still running - add nginx and sample nginx.conf to proxy to the api containers
- use node directly on startup for production use
Should be able to do something like docker-compose -f docker-compose.yml -f docker-compose.nodejs-alt.yml up --build --scale api-alt=6 --scale worker=3 if using docker-compose.
Cool; thanks! Great job. @tonyisworking maybe you’ve already seen our other project storefront-api? How about including this docker files there as well (if so please do use the “develop” branch). In the Storefornt-api case I guess we could name this file rather like “-prod” marking its desired for production setups (and the default one is for the development purposes)
@kkdg maybe we should include this alternate option in the docs?
Here’s the link: https://github.com/DivanteLtd/storefront-api
@pkarw Seems like a fork of the vuestorefront-api? ..From quickly skimming the repository, it seems similar enough to copy over... I'll open a PR