Skip to content

Commit

Permalink
chore: migrate from mailhog to mailpit (#3563)
Browse files Browse the repository at this point in the history
  • Loading branch information
sirtawast authored Nov 20, 2024
1 parent e6adf0a commit e213b5c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .env.benefit-backend.example
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
3 changes: 1 addition & 2 deletions backend/benefit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions compose.benefit-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions compose.benefit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e213b5c

Please sign in to comment.