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

Multiple Copies/Domains? #103

Closed
stevenmcastano opened this issue Oct 24, 2016 · 2 comments
Closed

Multiple Copies/Domains? #103

stevenmcastano opened this issue Oct 24, 2016 · 2 comments

Comments

@stevenmcastano
Copy link

I really want to be able to run this for multiple different domains and I installed it on a central email server I used, but I'm noticing now that basically everything is one large running copy.

So for instance, my default email is set to "do-not-reply@myemailserviceibuilt.com", so all of the confirmation emails and such come out from that address and even after creating new users in the database, they don't have their own email server settings, so I can really use a single running copy of this to cover multiple uses.

Also, things like the "view this email in your browser" link, can't really be set by default to another domain.... etc...

Would it be possible to just create multiple .toml files like domain1.toml, domain2.toml, etc... and just have them all point to different databases so I could have different settings, but still run from the same working directory? Or are there files on disk that will contain urls and such of where it was built?

Then if I do have a domain1.toml file, could I just create multiple upstart/systemd scripts to run the multiple copies on multiple ports at the same time?

@andris9
Copy link
Contributor

andris9 commented Nov 13, 2016

You can define config file with NODE_APP_INSTANCE environment variable, so for example if you have set NODE_APP_INSTANCE=1 and NODE_ENV=production then the config file to load (in addition to default.toml) would be production-1.toml. I haven't actually tried it but this is what the config package wiki says that Mailtrain is using.

@andris9 andris9 closed this as completed Nov 13, 2016
@balping
Copy link
Contributor

balping commented Sep 8, 2018

I confirm, the above method works.

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

3 participants