# Docker

Official docker image is available in [Docker Hub repository](https://hub.docker.com/repository/docker/hellofreshtech/janus). We also have a some cool examples with [Docker Compose template](https://github.com/hellofresh/janus/blob/master/examples) with built-in orchestration and scalability.

Here is a quick example showing how to link a Janus container to a MongoDB container:

1. **Start your database:**

If you wish to use a database instead of a file system based configuration just start the mongodb container:

```bash
$ docker run -d --name janus-database \
                -p 27017:27017 \
                mongo:3.0
```

1. **Configure the update frequency**

You should configure how frequently Janus will check for changes on your database. You can set this by changing the cluster configuration:

```
[cluster]
  UpdateFrequency = "5s"
```

You can find more information about Janus clusters in the [clustering](https://motivlabs.gitbook.io/janus/clustering) section.

1. **Start Janus:**

Start a Janus container and link it to your database container (if you are using it), configuring the `DATABASE_DSN` environment variable with the connection string like `mongodb://janus-database:27017/janus`:

```bash
$ docker run -d --name janus \
                --link janus-database:janus-database \
                -e "DATABASE_DSN=mongodb://janus-database:27017/janus" \
                -p 8080:8080 \
                -p 8443:8443 \
                -p 8081:8081 \
                -p 8444:8444 \
                hellofreshtech/janus
```

1. **Janus is running:**

```bash
$ curl http://127.0.0.1:8081/
```
