Skip to content

Commit

Permalink
Add Docker Compose file to ease deployment
Browse files Browse the repository at this point in the history
Add Docker Compose instructions to the README.md
  • Loading branch information
zombiedk authored and micahsnyder committed Oct 15, 2024
1 parent 9fa03c1 commit 43a121f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ You can test it by running `freshclam` or `freshclam.exe` locally, where you've
DatabaseMirror http://localhost:8000
```

### Use docker
## Use docker

Build docker image

Expand Down Expand Up @@ -338,6 +338,36 @@ docker run -d \
-e CRON='0 0 * * *' \
cvdupdate:latest
```
## Use Docker compose

Edit the compose file if you need to change the default values:

* Port 8000
* USER_ID=0
* CRON=30 */4 * * *

### Build
```
docker compose build
```

### Start
```
docker compose up -d
```

### Stop
```
docker compose down
```

### Volumes
Volumes are defined in the composefile and will be autocreated on `docker compose up`
```
DRIVER VOLUME NAME
local cvdupdate_database
local cvdupdate_log
```

## Contribute

Expand Down
18 changes: 18 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
services:
cvdupdate:
build: ./
hostname: cvdupdate
container_name: cvdupdate
image: cvdupdate:latest
ports:
- 8000:8000
environment:
- CRON=30 */4 * * *
- USER_ID=0
volumes:
- database:/cvdupdate/database
- log:/cvdupdate/logs

volumes:
database:
log:

0 comments on commit 43a121f

Please sign in to comment.