Tried to install Discourses through Docker with this article http://www.howtoinstalldiscourse.com/how-to-install-discourse-on-ubuntu/:
Have an error on Launch Discourse step (./launcher bootstrap app , ./launcher start app)
Please help!
OS: Ubuntu Studio 14.04
docker --version: Docker version 1.2.0, build fa7b24f
cosy@cosy-HP-EliteBook-8540w:/var/docker$ ./launcher bootstrap app
2014/09/24 15:50:59 Get http:///var/run/docker.sock/v1.14/info: dial unix /var/run/docker.sock: permission denied
Cannot connect to the docker daemon - verify it is running and you have access
cosy@cosy-HP-EliteBook-8540w:/var/docker$ sudo ./launcher bootstrap app
WARNING: No swap limit support
Calculated ENV: -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=3 -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=me@example.com -e DISCOURSE_HOSTNAME=discourse.example.com -e DISCOURSE_SMTP_ADDRESS=smtp.example.com
cd /pups && git pull && /pups/bin/pups --stdin
From https://github.com/SamSaffron/pups
f7a125b..ac9bdf8 master -> origin/master
Updating f7a125b..ac9bdf8
Fast-forward
README.md | 2 +-
lib/pups/config.rb | 14 +++++++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
I, [2014-09-24T12:51:14.130187 #43] INFO -- : Loading --stdin
I, [2014-09-24T12:51:14.134607 #43] INFO -- : > mkdir -p /shared/postgres_run
I, [2014-09-24T12:51:14.139001 #43] INFO -- :
I, [2014-09-24T12:51:14.139448 #43] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2014-09-24T12:51:14.143742 #43] INFO -- :
I, [2014-09-24T12:51:14.144293 #43] INFO -- : > chmod 775 /shared/postgres_run
I, [2014-09-24T12:51:14.148718 #43] INFO -- :
I, [2014-09-24T12:51:14.149481 #43] INFO -- : > rm -fr /var/run/postgresql
I, [2014-09-24T12:51:14.154116 #43] INFO -- :
I, [2014-09-24T12:51:14.154822 #43] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2014-09-24T12:51:14.159223 #43] INFO -- :
I, [2014-09-24T12:51:14.160482 #43] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2014/09/24 12:51:14 **socat[51] E connect(4, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory**
I, [2014-09-24T12:51:14.176709 #43] INFO -- :
I, [2014-09-24T12:51:14.177194 #43] INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2014-09-24T12:51:14.182002 #43] INFO -- :
I, [2014-09-24T12:51:14.182793 #43] INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2014-09-24T12:51:14.186791 #43] INFO -- :
I, [2014-09-24T12:51:14.195268 #43] INFO -- : File > /etc/service/postgres/run chmod: +x
I, [2014-09-24T12:51:14.203983 #43] INFO -- : File > /root/upgrade_postgres chmod: +x
I, [2014-09-24T12:51:14.205687 #43] INFO -- : > chown -R root /var/lib/postgresql/9.3/main
I, [2014-09-24T12:51:14.674964 #43] INFO -- :
I, [2014-09-24T12:51:14.675210 #43] INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/9.3/bin/initdb -D /shared/postgres_data || exit 0
I, [2014-09-24T12:51:14.678337 #43] INFO -- :
I, [2014-09-24T12:51:14.678486 #43] INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2014-09-24T12:51:14.683034 #43] INFO -- :
I, [2014-09-24T12:51:14.683239 #43] INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2014-09-24T12:51:14.687146 #43] INFO -- :
I, [2014-09-24T12:51:14.688147 #43] **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**
I, [2014-09-24T12:51:14.698314 #43] INFO -- :
I, [2014-09-24T12:51:14.698705 #43] INFO -- : > rm /root/upgrade_postgres
I, [2014-09-24T12:51:14.701577 #43] INFO -- :
I, [2014-09-24T12:51:14.703295 #43] INFO -- : Replacing data_directory = '/var/lib/postgresql/9.3/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/9.3/main/postgresql.conf
I, [2014-09-24T12:51:14.704076 #43] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.3/main/postgresql.conf
I, [2014-09-24T12:51:14.704511 #43] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.3/main/postgresql.conf
I, [2014-09-24T12:51:14.704993 #43] INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/9.3/main/postgresql.conf
I, [2014-09-24T12:51:14.705517 #43] INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.3/main/postgresql.conf
I, [2014-09-24T12:51:14.706063 #43] INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/9.3/main/postgresql.conf
I, [2014-09-24T12:51:14.706683 #43] INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/9.3/main/postgresql.conf
I, [2014-09-24T12:51:14.707527 #43] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2014-09-24T12:51:14.712618 #43] INFO -- :
I, [2014-09-24T12:51:14.712992 #43] INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = 4 in /etc/postgresql/9.3/main/postgresql.conf
I, [2014-09-24T12:51:14.713641 #43] INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = hot_standby in /etc/postgresql/9.3/main/postgresql.conf
I, [2014-09-24T12:51:14.714491 #43] INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/9.3/main/pg_hba.conf
I, [2014-09-24T12:51:14.715105 #43] INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/9.3/main/pg_hba.conf
I, [2014-09-24T12:51:14.715668 #43] INFO -- : > su - postgres -c '/usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main'
I, [2014-09-24T12:51:14.717909 #43] INFO -- : > sleep 5
2014-09-24 12:51:14 UTC FATAL: "/shared/postgres_data" is not a valid data directory
2014-09-24 12:51:14 UTC DETAIL: File "/shared/postgres_data/PG_VERSION" is missing.
I, [2014-09-24T12:51:19.721574 #43] INFO -- :
I, [2014-09-24T12:51:19.722366 #43] 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-09-24T12:51:19.808929 #43] INFO -- :
I, [2014-09-24T12:51:19.809564 #43] 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-09-24T12:51:19.894773 #43] INFO -- :
I, [2014-09-24T12:51:19.895610 #43] 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-09-24T12:51:19.963502 #43] INFO -- :
I, [2014-09-24T12:51:19.974952 #43] 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-09-24T12:51:20.045469 #43] INFO -- :
FAILED
--------------------
RuntimeError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 96 exit 2>
Location of failure: /pups/lib/pups/exec_command.rb:85:in `spawn'
exec failed with the params "su postgres -c 'psql discourse -c \"alter schema public owner to discourse;\"'"
b0ce6def79bdcdb9bf418f54fb8f2c77ada62b7cc6d2ca99688ae83c7cf992a4
FAILED TO BOOTSTRAP