]> cat aescling's git repositories - mastodon.git/commitdiff
When inside Docker, output saved configuration during mastodon:setup (#6711)
authorEugen Rochko <eugen@zeonfederated.com>
Fri, 9 Mar 2018 10:52:18 +0000 (11:52 +0100)
committerGitHub <noreply@github.com>
Fri, 9 Mar 2018 10:52:18 +0000 (11:52 +0100)
lib/tasks/mastodon.rake

index 0b011bf57fd6ae55d8413e8afa5d481a51c62b3d..d6c9e2d019cf9b0eea974e294bc39ceba83f2f7e 100644 (file)
@@ -286,6 +286,14 @@ namespace :mastodon do
 
         File.write(Rails.root.join('.env.production'), "# Generated with mastodon:setup on #{Time.now.utc}\n\n" + env.each_pair.map { |key, value| "#{key}=#{value}" }.join("\n") + "\n")
 
+        if using_docker
+          prompt.ok 'Below is your configuration, save it to an .env.production file outside Docker:'
+          prompt.say "\n"
+          prompt.say File.read(Rails.root.join('.env.production'))
+          prompt.say "\n"
+          prompt.ok 'It is also saved within this container so you can proceed with this wizard.'
+        end
+
         prompt.say "\n"
         prompt.say 'Now that configuration is saved, the database schema must be loaded.'
         prompt.warn 'If the database already exists, this will erase its contents.'