# Examples

## Check Destroy
```
docker run --net=host \
    -e MONGO_URI="mongodb://root:example@localhost:27017/qmicloud?authSource=admin" \
    -e API_KEY="c229219ccdd72d11e8ea253fd3876d247e5f489c9c84922cabdfb0cc194d8ff398a8d8d6528d8241efc99add2207e0ec75122a1b2c5598cc340cbe6b7c3c0dbf"  \
    qlikgear/qmi-cloud-cli:latest -s checkdestroy -t warning -r test
```

## Init DB
```
docker run --net=host \
    -e MONGO_URI="mongodb://root:example@localhost:27017/qmicloud?authSource=admin" \
    qlikgear/qmi-cloud-cli:latest -s initdb
```

## Check Destroy
```
docker run --net=host -e MONGO_URI=$MONGO_URI -e API_KEY=$API_KEY qlikgear/qmi-cloud-cli:latest -s checkdestroy -t warning -r test
```

## Check Stop
```
docker run --net=host -e SMTP_EMAIL_SENDER=http://172.20.16.4:9200/sendemail -e MONGO_URI=$MONGO_URI -e API_KEY=$API_KEY qlikgear/qmi-cloud-cli:latest -s checkstop -t warning -r test
```

## Check Errors
```
docker run --net=host -e MONGO_URI=$MONGO_URI qlikgear/qmi-cloud-cli:latest -s checkerror -r test
```

## Move Destroyed
```
docker run --net=host -e MONGO_URI=$MONGO_URI -v $PWD/qmi-cloud-provisions:/provisions qlikgear/qmi-cloud-cli:latest -s movedestroyed -r "2020-31-12T00:00:00.000Z"
```
