Skip to content

Commit

Permalink
Add apache instance to the docker-compose setup to serve the mirror
Browse files Browse the repository at this point in the history
Update README.md:
- Add information about volumes.
- Better explanation of the docker compose setup.

Co-authored-by: Micah Snyder <micasnyd@cisco.com>
  • Loading branch information
tj-cisco and micahsnyder committed Oct 15, 2024
1 parent 43a121f commit 1841f2a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,31 +338,35 @@ docker run -d \
-e CRON='0 0 * * *' \
cvdupdate:latest
```
## Use Docker compose
## Use Docker Compose

Edit the compose file if you need to change the default values:
A Docker `compose.yaml` is provided to:
1. Regularly update a Docker volume with the latest ClamAV databases.
2. Serve a database mirror on port 8000 using the Apache webserver.

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

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

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

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

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

### Volumes
Volumes are defined in the composefile and will be autocreated on `docker compose up`
Volumes are defined in `compose.yaml` and will be auto-created when you run `docker compose up`
```
DRIVER VOLUME NAME
local cvdupdate_database
Expand Down
9 changes: 7 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ services:
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
## Apache instance to serve the mirror
apache:
image: httpd:2.4
volumes:
- database:/usr/local/apache2/htdocs
ports:
- 8000:80

volumes:
database:
Expand Down

0 comments on commit 1841f2a

Please sign in to comment.