有进展了:
[root@localhost discourse]# ./launcher bootstrap app
which: no docker.io in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/vagrant/.local/bin:/home/vagrant/bin)
Unable to find image 'samsaffron/discourse:1.0.8' locally
Pulling repository samsaffron/discourse
Status: Downloaded newer image for samsaffron/discourse:1.0.8
cd /pups && git pull && /pups/bin/pups --stdin
From https://github.com/SamSaffron/pups
ee8fdfb..4203610 master -> origin/master
Updating ee8fdfb..4203610
Fast-forward
README.md | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
I, [2015-03-31T02:22:56.276592 #42] INFO -- : Loading --stdin
I, [2015-03-31T02:22:56.286037 #42] INFO -- : > mkdir -p /shared/postgres_run
I, [2015-03-31T02:22:56.292923 #42] INFO -- :
I, [2015-03-31T02:22:56.293505 #42] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2015-03-31T02:22:56.300595 #42] INFO -- :
I, [2015-03-31T02:22:56.301067 #42] INFO -- : > chmod 775 /shared/postgres_run
I, [2015-03-31T02:22:56.307126 #42] INFO -- :
I, [2015-03-31T02:22:56.307644 #42] INFO -- : > rm -fr /var/run/postgresql
I, [2015-03-31T02:22:56.314227 #42] INFO -- :
I, [2015-03-31T02:22:56.314744 #42] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2015-03-31T02:22:56.319981 #42] INFO -- :
I, [2015-03-31T02:22:56.320511 #42] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2015/03/31 02:22:56 socat[50] E connect(4, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2015-03-31T02:22:56.347450 #42] INFO -- :
I, [2015-03-31T02:22:56.348903 #42] INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2015-03-31T02:22:56.354081 #42] INFO -- :
I, [2015-03-31T02:22:56.354583 #42] INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2015-03-31T02:22:56.360175 #42] INFO -- :
I, [2015-03-31T02:22:56.360619 #42] INFO -- : > mkdir -p /shared/postgres_run/9.3-main.pg_stat_tmp
I, [2015-03-31T02:22:56.365242 #42] INFO -- :
I, [2015-03-31T02:22:56.365805 #42] INFO -- : > chown postgres:postgres /shared/postgres_run/9.3-main.pg_stat_tmp
I, [2015-03-31T02:22:56.372005 #42] INFO -- :
I, [2015-03-31T02:22:56.378325 #42] INFO -- : File > /etc/service/postgres/run chmod: +x
I, [2015-03-31T02:22:56.384461 #42] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x
I, [2015-03-31T02:22:56.390027 #42] INFO -- : File > /root/upgrade_postgres chmod: +x
I, [2015-03-31T02:22:56.391631 #42] INFO -- : > chown -R root /var/lib/postgresql/9.3/main
I, [2015-03-31T02:22:56.402575 #42] INFO -- :
I, [2015-03-31T02:22:56.402729 #42] 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
LOG: could not link file "pg_xlog/xlogtemp.75" to "pg_xlog/000000010000000000000001" (initialization of log file): Operation not permitted
FATAL: could not open file "pg_xlog/000000010000000000000001": No such file or directory
child process exited with exit code 1
initdb: removing contents of data directory "/shared/postgres_data"
I, [2015-03-31T02:22:57.395615 #42] INFO -- : The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /shared/postgres_data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
creating configuration files ... ok
creating template1 database in /shared/postgres_data/base/1 ...
I, [2015-03-31T02:22:57.395741 #42] INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2015-03-31T02:22:57.402395 #42] INFO -- :
I, [2015-03-31T02:22:57.402543 #42] INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2015-03-31T02:22:57.404866 #42] INFO -- :
I, [2015-03-31T02:22:57.405266 #42] 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, [2015-03-31T02:22:57.421684 #42] INFO -- :
I, [2015-03-31T02:22:57.422154 #42] INFO -- : > rm /root/upgrade_postgres
I, [2015-03-31T02:22:57.424945 #42] INFO -- :
I, [2015-03-31T02:22:57.428843 #42] 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, [2015-03-31T02:22:57.430721 #42] INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-31T02:22:57.431348 #42] INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-31T02:22:57.433225 #42] INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-31T02:22:57.436609 #42] INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-31T02:22:57.437888 #42] 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, [2015-03-31T02:22:57.438739 #42] INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2015-03-31T02:22:57.446019 #42] INFO -- :
I, [2015-03-31T02:22:57.446348 #42] INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = 4 in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-31T02:22:57.448164 #42] INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = hot_standby in /etc/postgresql/9.3/main/postgresql.conf
I, [2015-03-31T02:22:57.451249 #42] INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres peer in /etc/postgresql/9.3/main/pg_hba.conf
I, [2015-03-31T02:22:57.451710 #42] 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, [2015-03-31T02:22:57.454069 #42] INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main
I, [2015-03-31T02:22:57.476026 #42] INFO -- : > sleep 5
2015-03-31 02:22:57 UTC [82-1] FATAL: data directory "/shared/postgres_data" has wrong ownership
2015-03-31 02:22:57 UTC [82-2] HINT: The server must be started by the user that owns the data directory.
I, [2015-03-31T02:23:02.483957 #42] INFO -- :
I, [2015-03-31T02:23:02.484546 #42] 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, [2015-03-31T02:23:02.602064 #42] INFO -- :
I, [2015-03-31T02:23:02.603122 #42] 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, [2015-03-31T02:23:02.685681 #42] INFO -- :
I, [2015-03-31T02:23:02.686969 #42] 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, [2015-03-31T02:23:02.755784 #42] INFO -- :
I, [2015-03-31T02:23:02.756478 #42] 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"?
FAILED
--------------------
RuntimeError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 108 exit 2>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
I, [2015-03-31T02:23:02.826678 #42] INFO -- :
I, [2015-03-31T02:23:02.827076 #42] INFO -- : Terminating async processes
d4d53174d9a487a35a0549c06c9606e0b0d9db114cd8b3689edddc96d791f4f9
FAILED TO BOOTSTRAP
[root@localhost discourse]# ./launcher start app
which: no docker.io in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/vagrant/.local/bin:/home/vagrant/bin)
+ /usr/bin/docker run -d --restart=always -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=837546837@qq.com -e DISCOURSE_HOSTNAME=www.xiao.com -e DISCOURSE_SMTP_ADDRESS=smtp.mailgun.org -e DISCOURSE_SMTP_USER_NAME=postmaster@sandbox04e1ceec74b64fce8674d9e8e0ab8438.mailgun.org -e DISCOURSE_SMTP_PASSWORD=2ca5fa4dbd9f749045996521283f9af8 -h localhost.localdomain-app -e DOCKER_HOST_IP=172.17.42.1 --name app -t -p 80:80 -p 2222:22 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log local_discourse/app /sbin/boot
Unable to find image 'local_discourse/app' locally
Pulling repository local_discourse/app
2015/03/31 02:24:32 Error: image local_discourse/app not found
[root@localhost discourse]#