Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing outgoing smtp file with docker-compose #452

Open
SamTyurenkov opened this issue Sep 5, 2023 · 1 comment
Open

Passing outgoing smtp file with docker-compose #452

SamTyurenkov opened this issue Sep 5, 2023 · 1 comment

Comments

@SamTyurenkov
Copy link

H,

Is there a way to pass outgoing smtp json without custom docker image?

version: '3'

services:
  mailhog:
    image: mailhog/mailhog
    restart: always
    ports:
      - 1025:1025  # SMTP port for sending emails
      - 8025:8025  # Web UI for viewing emails
    volumes:
      - ./mailhog.cfg.json:/mailhog.cfg.json
    command: ["-outgoing-smtp", "/mailhog.cfg.json"]

If i try it this way, - a directory is created instead of copying a file.
is there a way to pass .json to Mailhog in Docker without creating custom Docker Image?

@kbekus
Copy link

kbekus commented Oct 8, 2024

I don't have an exact docker-compose.yml file handy but this is what we did in docker:

volumes:
- ./mailhog.cfg.json:/mailhog.cfg.json
environment:
- MH_OUTGOING_SMTP=/mailhog.cfg.json

add that to the rest of your compose file and remove the command: line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants