Test & activation emails are sent with port 4000 included

Everthing is working, including e-mail delivery - but: the activation/test links in the emails are of the form:


I’ve checked my app.yml and there’s no port 4000 in there. Is the system somehow thinking it’s running in development mode?

Do you have any of the WARNING: DEVELOPER ONLY settings set? Is this installed using our Docker guide?

Installed via Docker, but imported a vBulletin database from inside the development environment (using git clone … -> vagrant up -> vagrant ssh -> ruby script/import_scripts/vbulletin.rb etc.). Inside vagrant I then took a database dump using:

pg_dump -xOf ./discourse-backup.sql -n public discourse_development

Then copied this dump to my production discourse install and did inside psql:

drop schema public cascade;
create schema public;

Then on the command line
sudo -u postgres psql -f /shared/discourse-backup.sql discourse

Noticed that the gravatar paths are all wrong as well. Since the vBulletin import took ~8 hours (200 000 posts), I’m reluctant to start over. Can the email-path be edited inside the database (couldn’t find anything doing a simply ‘grep’ on the dump)?

Why didn’t you use the backup/restore feature in Discourse?

The discourse remap script might help you here.

Actually also noticed that the load times (in ms) show up on the left side of the screen. Does that mean my discourse is running in development mode and not in production?

How can I change this?

codinghorror: where do I find the “WARNING: DEVELOPER ONLY” settings?

It’s only displayed for administrators, even in production.

If you search for DEVELOPER ONLY in the site settings and you have results, then you’re definitely running in development mode (we hide them when running in production mode).

No, nothing comes up when I do that - No results found.

But if you imported a database from a development mode import, that setting might be present, I guess.

The odd thing is that it’s port 4000. That’s used for Unicorn, not the dev-mode webserver (which defaults to 3000, as does SiteSetting.port)…

Anyway, try:

/var/discourse/launcher enter app
rails c 
SiteSetting.port = ""
SiteSetting.force_hostname = ""
SiteSetting.queue_jobs = true

SiteSetting.port returned 4000, so setting this to “” fixed the email issue. Thank you!

1 Like