mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 00:35:51 +03:00
[GH-ISSUE #562] Service keeps restarting with Docker Compose config #362
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#362
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kylegillen on GitHub (Sep 3, 2025).
Original GitHub issue: https://github.com/axllent/mailpit/issues/562
Hi. Awesome product! Thanks for making it 😊
When running the example docker command in the terminal, it simply keeps restarting and seemingly
exiting with code 0:I've verified that there's nothing running on the same ports:
lsof -i tcp:8025I've gone hunting around github repos seeing if anyone has done anything different, but to no avail.
I'm not sure if there's a command that needs to be run to keep the service alive?
Adding
tty: trueto the service seems to keep it running, but doesn't make the GUI available at http://localhost:8025I'm running macOSX 15.6.1 and using Docker desktop 4.45.0
I've installed the app via homebrew, and the GUI loads as expected.
Here's my full Docker related code for completeness (and just to confirm, I've also tried accessing the GUI via the port
DOCKER_MAIL_CLIENT_PORTrepresents to no avail):docker-compose.dev.yml
docker-compose.yml
Dockerfile.dev
@axllent commented on GitHub (Sep 3, 2025):
Hi @kylegillen. Sorry to hear about your issues. What does the docker log say, as I'm sure Mailpit will log errors if it is unsable to start properly or is exiting prematurely:
docker compose logs mail(I think)?@kylegillen commented on GitHub (Sep 3, 2025):
Thanks so much for the prompt response @axllent 😊
I wish I had more to go on, but when I run:
docker compose --env-file .env.local --env-file .env.docker -f docker-compose.yml -f docker-compose.dev.yml logs --tail 50 --follow --timestamps mailThe only thing that gets logged is:
mail exited with code 0In Docker Desktop the mail container simply just keeps restarting.
If I add
tty: true, the container at least stays open and logs:@axllent commented on GitHub (Sep 3, 2025):
No problem. I'm afraid I don't have anything to go on here, except that I strongly suspect this has absolutely nothing to do with Mailpit, but rather your application in general. Mailpit goes not use node, so that
Welcome to Node.js v22.19.0...message is not even coming from Mailpit container but likely your "server" container. My guess is that Mailpit is being automatically closed/exited when your "server" container exists (as it's being simply added here as a service dependency).Sorry, I'm not much help here.
@kylegillen commented on GitHub (Sep 3, 2025):
Turns out in my case it's related to adding a network to the mail service:
Does that help at all? Should a network be impacting the service this way?
@kylegillen commented on GitHub (Sep 3, 2025):
Well, after starting it without the network setting, and adding it back seems to have resolved the issue 🤷♂️
Sorry for wasting your time, but thank you so much for the help!
@axllent commented on GitHub (Sep 3, 2025):
I'm pretty sure you did all the hard thinking here, so well done on solving your issue! I don't do much personally with docker compose (I tend to use docker directly), so I always feel a little helpless when things like this happen.