mastodon / mastodon

Your self-hosted, globally interconnected microblogging community
https://joinmastodon.org
GNU Affero General Public License v3.0
47.01k stars 6.96k forks source link

SMTP_SERVER is not set correctly via rake mastodon:setup #18384

Open timaschew opened 2 years ago

timaschew commented 2 years ago

Steps to reproduce the problem

  1. Clone repo and checkout v3.5.2
  2. Go through docker-compose run --rm web bundle exec rake mastodon:setup, email test is working (I receive an email)
  3. docker-compose up -d
  4. Register a new user account and no email confirmation is send ...

When checeking the config and logs I see that SMTP_SERVER is no set correctly from the interactive rake mastodon:setup command.

Expected behaviour

SMTP_SERVER should be set to the passed value

Actual behaviour

SMTP_SERVER is always set to localhost

Specifications

v3.5.2 via docker

ClearlyClaire commented 2 years ago

Did you copy the contents of .env.production based on the instructions from mastodon:setup?

timaschew commented 2 years ago

What do you mean with copy? Manual copy & past?

Either the mastodon:setup should updat the .env.production should write to the .env.production file everything or nothing, right now it's doing half of the job which is very confusing (or even wrong).

ClearlyClaire commented 2 years ago

When using Docker, the setup scripts instructs you to copy the file:

Below is your configuration, save it to an .env.production file outside Docker

This is because the file is used as environment source for all the containers, and cannot be written from within the container.

Either the mastodon:setup should updat the .env.production should write to the .env.production file everything or nothing

It does not overwrite the .env.production file that is outside the container at all.