Skip to content

Commit

Permalink
Merge pull request #11 from eduardocerqueira/db_path
Browse files Browse the repository at this point in the history
fix databases path
  • Loading branch information
jujaga authored Aug 25, 2022
2 parents 01b04e3 + 14a636d commit 08a24aa
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,25 @@ Once you have the mirror running, you can visit <http://localhost:8080> to see w
```txt
DatabaseMirror http://localhost:8080
```

### Run (dev & troubleshooting)

some helpful commands for developing and troubleshooting:

```sh
# build image

# run container and get into bash
docker run --name clamav --rm -it clamav-mirror bash

# run status
sh entrypoint.sh status

# check config file and paths
cat /mnt/cvdupdate/config.json
ls -laht /mnt/cvdupdate/{logs,databases}

# run update and check files
sh entrypoint.sh update
ls -laht /mnt/cvdupdate/databases/*.cvd
```
4 changes: 4 additions & 0 deletions docker/src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ check_config() {
cvd config set --config $CVD_DIR/config.json --dbdir $CVD_DIR/databases --logdir $CVD_DIR/logs
echo "CVD configuration created..."
fi
if [ ! -e $CVD_DIR/databases ]; then
echo "Creating $CVD_DIR/databases folder"
mkdir -p $CVD_DIR/databases
fi
}

show_config() {
Expand Down

0 comments on commit 08a24aa

Please sign in to comment.