# Docker

We use [`docker`](https://www.docker.com/) 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](https://www.docker.com/community-edition).

Minimal versions:

* `docker`: `18.02`
* `docker-compose`: `1.20`

## Developing

To start your development environment just run:

```bash
docker-compose up
```

That's it. You will see that your development server is up and running.

## Testing

To test your application run:

```bash
docker-compose run --rm vue npm run test
```

## Production

We use [`GitLab CI`](/wemake-vue-template/gitlab-ci.md) 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:

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, use `npm 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`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wemake-services.gitbook.io/wemake-vue-template/docker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
