Failed to install Discourse in Ubuntu14.04: docker problems

@sam @codinghorror ? Any ideas, guys?

  1. I stopped with same error as in 1st topic message after “./launcher bootstrap app” and have no idea how to start discource.

Figured out that troubles due log starting with this lines:

INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2014/10/09 01:18:25 socat[54] E connect(4, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory

INFO -- : > /root/upgrade_postgres
cat: /shared/postgres_data/PG_VERSION: No such file or directory
/root/upgrade_postgres: line 2: [: 9.2: unary operator expected

INFO -- : > su postgres -c 'createdb discourse' || true
createdb: could not connect to database template1: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2014-10-09T01:18:30.996811 #46]  INFO -- : 
I, [2014-10-09T01:18:31.008665 #46]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2014-10-09T01:18:31.072893 #46]  INFO -- : 
I, [2014-10-09T01:18:31.073980 #46]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2014-10-09T01:18:31.138713 #46]  INFO -- : 
I, [2014-10-09T01:18:31.139386 #46]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I, [2014-10-09T01:18:31.200614 #46]  INFO -- : 
  1. Main hook now that “/shared/postgres_data” is not a valid data directory" and "postgres PG_VERSION is missing ". googling..

2.1) According this case: Solved: Postgresql 8.4 on Ubuntu - PG_VERSION is missing | Experts Exchange

sudo sysv-rc-conf postgresql on
service postgresql start

– without result.

2.2) As I figure out, PostgreSQL’s data directory missing. http://dba.stackexchange.com/a/1354
On Debian/Ubuntu:

pg_lsclusters
Ver Cluster Port Status Owner    Data directory               Log file
9.3 main    5432 online postgres /var/lib/postgresql/9.3/main /var/log/postgresql/postgresql-9.3-main.log

But how I can use this info? Is there is any ways to link it with docker?

  1. Seems like I not alone with this.
    Guy in this topic had same error 2 days ago during update: “socat[51] E connect(4, AF=1 “/shared/postgres_run/.s.PGSQL.5432”, 36): No such file or directory”.

  2. launcher start app comes with:

    cosy@cosy-HP-EliteBook-8540w:/var/discourse$ sudo ./launcher start app
    WARNING: No swap limit support
    No cid found, creating a new container
    Calculated ENV: -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=2 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_MALLOC_LIMIT=40000000 -e RUBY_HEAP_MIN_SLOTS=800000 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e HOME=/root -e DISCOURSE_DEVELOPER_EMAILS=craft37@gmail.com -e DISCOURSE_HOSTNAME=localhost -e DISCOURSE_SMTP_ADDRESS=smtp.mandrillapp.com -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=mail@gmail.com -e DISCOURSE_SMTP_PASSWORD=pass-Q
    Unable to find image ‘local_discourse/app’ locally
    Pulling repository local_discourse/app
    2014/10/09 07:15:00 Error: image local_discourse/app not found