vendure-ecommerce / vendure-docker-compose

A containerized Vendure server and storefront
MIT License
35 stars 37 forks source link

mailbox is useless #7

Open tpimh opened 3 years ago

tpimh commented 3 years ago

All mail is sent by the worker, but the mailbox is served by the server. Worker and server are in two different containers, so all mail generated by worker is not accessible by the server, rendering the mailbox useless (and even confusing, as I tried modifying server config for email settings and wondering why new mail is not appearing in static/email/test-emails).

michaelbromley commented 3 years ago

Good point. Maybe it is the case that the mailbox should not even be enabled in a docker-compose project, since it is firmly intended to be a local, dev-time convenience, and I would expect it normally to be used in a context where neither the server nor worker are running in a container.

At the same time, setting "devMode: true" automatically starts the mailbox server, so that would need to be de-coupled and allows an extra option to not even serve the mailbox app if the worker is on a different server/container.

tpimh commented 3 years ago

Maybe starting a separate web server just for the mailbox in worker container if devMode is enabled would be a better solution. Not sure if it's feasible, but maybe server and worker should have two different configs (or even different sets of dependencies: the worker is using very little of what's needed for the server, and vise versa).