diff --git a/.env b/.env index 39ff610cddd00adb541bc6b6c9936165e215ceac..8280cab11be0048a6fbd6520252d6fd7fa9fd4d3 100644 --- a/.env +++ b/.env @@ -1,4 +1,14 @@ ENV=development + +# When using the SMTP backend, specify how to connect to the SMTP server. +# Documentation for these settings can be found in the Django Email docs: +# https://docs.djangoproject.com/en/2.2/topics/email/#smtp-backend + +EMAIL_USE_TLS=True +EMAIL_USE_SSL=None +EMAIL_TIMEOUT=10 +EMAIL_WHITELIST=["user@cern.ch"] + PROCESSOR=email CONSUMER_NAME=email_consumer PUBLISHER_NAME=email_publisher @@ -13,15 +23,14 @@ DB_HOST=pg_db DB_PORT=5432 DB_NAME=push_dev -# When using the SMTP backend, specify how to connect to the SMTP server. -# Documentation for these settings can be found in the Django Email docs: -# https://docs.djangoproject.com/en/2.2/topics/email/#smtp-backend + +# Configuration for sending email to the console (uncomment to use it) EMAIL_HOST=localhost EMAIL_PORT=8025 EMAIL_HOST_USER=user@cern.ch EMAIL_HOST_PASSWORD=password -EMAIL_USE_TLS=None -EMAIL_USE_SSL=None -EMAIL_TIMEOUT=10 -EMAIL_WHITELIST=["user@cern.ch"] +# Configuration for sending email to the emails in the whitelist (uncomment to use it) +# EMAIL_HOST=cernmx.cern.ch +# EMAIL_PORT=25 +# EMAIL_BACKEND=vendor.django_mail.backends.smtp.EmailBackend diff --git a/.isort.cfg b/.isort.cfg index f0ca762a30be730b77e6c414f22208214138ff49..d7148cf1b3dc0566361ee4c5d4a645fba9fef075 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -4,4 +4,4 @@ multi_line_output=3 include_trailing_comma=True lines_after_imports=2 not_skip=__init__.py -known_third_party = jinja2,megabus,notifications_consumer,sqlalchemy,stomp,yaml +known_third_party = jinja2,megabus,requests,sqlalchemy,stomp,yaml diff --git a/README.md b/README.md index 2cacf1e9dc4402b4bd25a83513270879e7f56ef9..1326c87e856b1406b2c562e90292222b0bbc37c3 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,11 @@ This is the recommended method to develop. $ docker login gitlab-registry.cern.ch ``` +- As an optional but recommended step, you can rebuild the notifications-consumer container before start it. This step is necessary if dependencies were added or updated since the last image build since there will be probably a dependency error once the container is trying to start. +```bash +$ make docker-build +``` + - Start the consumer container and ActiveMQ ```bash $ make docker-build-env