diff --git a/README.md b/README.md index bc3545f..c265f1b 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..fae06ed --- /dev/null +++ b/compose.yaml @@ -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: