Hi all,
Just thought I'd share my experience with you. I had a similar experience when changing the domain name (we have a custom-managed DNS). However, the solution provided by this post is not valid.
The error I got was:
INFO -- : > cd /var/www/discourse && bash -c "ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log /var/www/discourse/log"
ln: failed to create symbolic link ‘/var/www/discourse/log/production.log’: File exists
ln: failed to create symbolic link ‘/var/www/discourse/log/production_errors.log’: File exists
ln: failed to create symbolic link ‘/var/www/discourse/log/unicorn.stdout.log’: File exists
ln: failed to create symbolic link ‘/var/www/discourse/log/unicorn.stderr.log’: File exists
I, [2015-05-18T09:59:43.413737 #38] INFO -- :
I, [2015-05-18T09:59:43.414153 #38] INFO -- : Terminating async processes
I, [2015-05-18T09:59:43.414276 #38] INFO -- : Sending INT to 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 pid: 108
I, [2015-05-18T09:59:43.414403 #38] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 231
2015-05-18 09:59:43 UTC [108-2] LOG: received fast shutdown request
2015-05-18 09:59:43 UTC [108-3] LOG: aborting any active transactions
2015-05-18 09:59:43 UTC [115-2] LOG: autovacuum launcher shutting down
231:signal-handler (1431943183) Received SIGTERM scheduling shutdown...
2015-05-18 09:59:43 UTC [112-1] LOG: shutting down
231:M 18 May 09:59:43.497 # User requested shutdown...
231:M 18 May 09:59:43.497 * Saving the final RDB snapshot before exiting.
231:M 18 May 09:59:43.523 * DB saved on disk
231:M 18 May 09:59:43.523 # Redis is now ready to exit, bye bye...
2015-05-18 09:59:43 UTC [112-2] LOG: database system is shut down
FAILED
--------------------
RuntimeError: cd /var/www/discourse && bash -c "ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log /var/www/discourse/log" failed with return #<Process::Status: pid 299 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"code", "cmd"=>["git reset --hard", "git clean -f", "git remote set-branches --add origin master", "git pull", "git fetch origin $version", "git checkout $version", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p /shared/log/rails", "bash -c \"touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log\"", "bash -c \"ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log $home/log\"", "bash -c \"mkdir -p /shared/{uploads,backups}\"", "bash -c \"ln -s /shared/{uploads,backups} $home/public\"", "chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups"]}
7d58930fa67b8bfb454f7a64decc1a0029e71aeb314367633e2f092889f8a9f1
FAILED TO BOOTSTRAP
There is clearly something wrong with the way that existing symlinks are dealt with.
I had tried to be fancy and use an existing docker image as the base (editing launcher
) to use it, which didn't work. However, after cleaning up (rm -rf
) everything under /var/discourse/shared
I re-ran bootstrap (after removing all images on the host), the bootstrap worked.
I guess the question is : how do I run discourse in a pre-prepared container (ie, move from my laptop dev environment to the hosted web environment ?)