From 775958148e4d6e84397dc378edc163a19b911256 Mon Sep 17 00:00:00 2001 From: Sampo Tawast Date: Wed, 20 Nov 2024 13:02:49 +0200 Subject: [PATCH] chore: migrate from mailhog to mailpit --- .env.benefit-backend.example | 4 ++-- backend/benefit/README.md | 3 +-- compose.benefit-backend.yml | 6 +++--- compose.benefit.yml | 6 +++--- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.env.benefit-backend.example b/.env.benefit-backend.example index 2587bfb72c..a1b1258d14 100644 --- a/.env.benefit-backend.example +++ b/.env.benefit-backend.example @@ -100,8 +100,8 @@ SENTRY_DSN= # local / development / testing SENTRY_ENVIRONMENT=local -# for Mailhog inbox -EMAIL_HOST=mailhog +# for Mailpit inbox +EMAIL_HOST=mailpit EMAIL_PORT=1025 AHJO_CLIENT_ID= diff --git a/backend/benefit/README.md b/backend/benefit/README.md index 844eed5aba..d24105c927 100644 --- a/backend/benefit/README.md +++ b/backend/benefit/README.md @@ -103,7 +103,7 @@ DUMMY_COMPANY_FORM_CODE can be set to test with different company_form parameter To seed the database with some mock application data, run `python manage.py seed` , which by default generates 10 applications for each of the seven possible application statuses and one attachment with a .pdf-file for each of them. To generate more applications, use the optional `--number` flag, for example, running `python manage.py seed --number=30` creates 30 applications of each status. **Note that running the command deletes all previous application data from the database and clears the media folder.** -[Mailhog](https://github.com/mailhog) is available for the local development environment (localhost:8025)[http://localhost:8025/] for previewing +[Mailpit](https://github.com/axllent/mailpit) is available for the local development environment (localhost:8025)[http://localhost:8025/] for previewing and testing the emails sent by the application after setting the `EMAIL_HOST` and `EMAIL_PORT` as in the `.env.benefit-backend.example`. **Using LOAD_FIXTURES=1 is recommended for local testing** as it loads e.g. default @@ -117,7 +117,6 @@ application using the applicant UI. - `pip install pip-tools` - `pip install --upgrade pip-tools` - 2. Add new packages to `requirements.in` or `requirements-dev.in` 3. Update `.txt` file for the changed requirements file: diff --git a/compose.benefit-backend.yml b/compose.benefit-backend.yml index 6f95b44b81..85350d4904 100644 --- a/compose.benefit-backend.yml +++ b/compose.benefit-backend.yml @@ -46,12 +46,12 @@ services: ports: - 127.0.0.1:8000:8000 - mailhog: - image: "mailhog/mailhog@sha256:8d76a3d4ffa32a3661311944007a415332c4bb855657f4f6c57996405c009bea" + mailpit: + image: "axllent/mailpit:v1.21.4" ports: - 1025:1025 - 8025:8025 - container_name: benefit-mailhog + container_name: benefit-mailpit networks: - default diff --git a/compose.benefit.yml b/compose.benefit.yml index e7fdcff2e6..42ea135843 100644 --- a/compose.benefit.yml +++ b/compose.benefit.yml @@ -84,12 +84,12 @@ services: - 127.0.0.1:3000:3000 - 127.0.0.1:3100:3100 - mailhog: - image: "mailhog/mailhog@sha256:8d76a3d4ffa32a3661311944007a415332c4bb855657f4f6c57996405c009bea" + mailpit: + image: "axllent/mailpit:v1.21.4" ports: - 1025:1025 - 8025:8025 - container_name: benefit-mailhog + container_name: benefit-mailpit networks: - default