Docker install mac, fails to update app.yml

I get the following errors if I follow the tutorial to the letter (skipping letsencrypt) on Mac OS Sierra after running ./discourse-setup

Any idea what can cause this?

DISCOURSE_SMTP_PORT change failed.
DISCOURSE_SMTP_USER_NAME change failed.
DISCOURSE_SMTP_PASSWORD change failed.
web.ssl.template.yml NOT DISABLED--Are you using a non-standard template?
web.ssl.template.yml NOT DISABLED--Are you using a non-standard template?

Any help would be appreciated.
Reason for installing docker locally is that I want to try to get some custom plugins in docker running locally before I push them to production.

Do you have a let’s encrypt account?
If you have added the email, make sure you have uncommented the let’s encrypt lines.

I do not have a let’s encrypt account; I have skipped the appropriate steps in the tutorial.

Is letsencrypt now a requirement? If so, I think the discourse-setup script should be changed to make that explicit.

My guess is that there is some compatibility with Mac sed. Sorry about that.

It has nothing to do with let’s encrypt. The problem is that sed isn’t doing the replacements that it’s trying to do.

Your best bet is to edit app.yml with vim or nano.

3 Likes

The intention around easy setup is very specifically for easing cloud based installs, not for local dev on a mac.

I would use docker for local dev in this way https://github.com/discourse/discourse/tree/master/bin/docker

5 Likes

Aha, that one looks a lot better indeed. I’ll try later today, thanks.

Can I suggest Discourse make an install overview page? Something that explains the different ways of installing. Hopefully that will actually end up in google if you search for Discourse install :slight_smile:

Currently I find:

1 Like

I’m using the link above to run discourse on my Mac.

Can anyone explain how can I connect to the postgresql server running inside docker? I’ve tried to map the port 5432 but weren’t able to connect using pgadmin.

Thanks in advance

Don’t use this setup for mac; that was kind of the conclusion of the thread :-/

Hi @Bas, sorry for not being clear.

I’m using the local docker setup for dev suggested by @sam.

Thanks

I’ve just found the answer in the following post

You need to do this:

  • Enter the container.
  • su - postgres
  • psql -d postgres -c "ALTER USER postgres WITH PASSWORD '<new password>';"

By default, PostgreSQL uses peer authentication for local connections. It uses a feature of Linux whereby it can get the user that initiated the incoming connection, but this only works when the connection was made through the loopback-device (i.e. 127.0.0.1) or a UNIX socket.

When you’re connecting from a remote computer through the TCP socket, peer authentication isn’t available and the Discourse docker container is configured to have PostgreSQL fall back to MD5 authentication. This uses password hashes stored in the database itself, so these passwords are different from the system user passwords, hence passwd postgres , which changes the system login password, doesn’t affect Postgres.

2 Likes