# vue-cli-plugin-vuedock
A plugin for the awesome Vue CLI that generates the Docker and docker-compose files necessary for both development and production.
You can install from npm using the Vue CLI:
vue add vuedock
The plugin will add a Dockerfile
to your web application that uses multi-stage builds so you don't need separated Dockerfiles for development and production.
- When building the development stage, all dependencies are installed into a Node image with
npm run serve
as its default command. - When building the production stage, an NGINX image is used, including only static files previously generated by
npm run build
.
Development is further simplified by generating a docker-compose.yml
file:
- You can start your development server with hot-reload using
docker-compose up app
- You can run linting and tests using similar commands, such as
docker-compose run --rm app npm run test:unit
- If e2e tests are available in your project, it will also add support for running them, including a Selenium container for Nightwatch E2E tests!
The plugin will automatically detect whether your project is using npm or yarn, and adapt the generated files accordingly.
Check it on GitHub: