From b7d0e22eb57b2ee00d57b8b46580d6526b6f3067 Mon Sep 17 00:00:00 2001 From: Merlin Beutlberger Date: Mon, 13 Apr 2020 16:50:30 +0200 Subject: [PATCH] Readme: Improve docker-compose sample and describe cron job schedule (#7) * Readme: Improve docker-compose sample - Add attributes "version" and "services" to make it a docker-compose.yml - Add mariadb service with preconfigured user and database Resolves https://github.com/gutmensch/docker-dmarc-report/issues/1 * Readme: Describe cron job schedule It took me a while to figure out why nothing happened after starting the container. This should help new users to understand that they only have to wait for the cron job to start. --- README.md | 53 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index ea9d5bf..ae6427c 100644 --- a/README.md +++ b/README.md @@ -18,33 +18,52 @@ docker pull gutmensch/dmarc-report docker run -e ... -ti gutmensch/dmarc-report ``` +New dmarc reports will be fetched every 15 minutes past the hour, every hour. Therefore it can take up to one hour for the first report to be fetched. + ## Versions for last build latest dmarcts report viewer: 2019-01-04 dmarcts report parser: 2019-01-04 ## Sample docker compose / Environment variables -The variables should be self-explanatory. Make sure to create the DB and IMAP folders before the cron job runs! -``` -dmarc-report: - image: "gutmensch/dmarc-report:latest" - hostname: dmarc-report - container_name: dmarc-report - environment: - - "REPORT_DB_HOST=mysql" - - "REPORT_DB_NAME=dmarc_report" - - "REPORT_DB_USER=dmarc_report" - - "REPORT_DB_PASS=foobar" - - "PARSER_IMAP_SERVER_WITH_PORT=mail:143" - - "PARSER_IMAP_USER=foobar@example.com - - "PARSER_IMAP_PASS=foobar" - - "PARSER_IMAP_READ_FOLDER=Inbox" - - "PARSER_IMAP_MOVE_FOLDER=processed" +The variables should be self-explanatory. Make sure to create the IMAP folders before the cron job runs! + +**docker-compose.yml** +```yaml +version: '3.6' + +services: + dmarc-report: + image: "gutmensch/dmarc-report:latest" + hostname: dmarc-report + container_name: dmarc-report + depends_on: + - db + ports: + - "80:80" + environment: + - "REPORT_DB_HOST=db" + - "REPORT_DB_NAME=dmarc_report" + - "REPORT_DB_USER=dmarc_report" + - "REPORT_DB_PASS=dbpassword" + - "PARSER_IMAP_SERVER_WITH_PORT=mail:143" + - "PARSER_IMAP_USER=foobar@example.com" + - "PARSER_IMAP_PASS=foobar" + - "PARSER_IMAP_READ_FOLDER=Inbox" + - "PARSER_IMAP_MOVE_FOLDER=processed" + + db: + image: mariadb:10 + environment: + - "MYSQL_ROOT_PASSWORD=dbrootpassword" + - "MYSQL_DATABASE=dmarc_report" + - "MYSQL_USER=dmarc_report" + - "MYSQL_PASSWORD=dbpassword" ``` ## Optional extended configuration Use SSL instead of default TLS. Set both to 0 to turn off encryption. (not recommended) -``` +```yaml - "PARSER_IMAP_SSL=1" - "PARSER_IMAP_TLS=0" ```