about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-03-09 11:52:18 +0100
committerGitHub <noreply@github.com>2018-03-09 11:52:18 +0100
commite5f18ace2abf0b4f82dc6b13d5f52106da0c1bee (patch)
treec89593fa0a4135c073a823166a7fd15fc4d56d64 /lib
parent11697d68942db7b97a4c7384e4fb4148a97b9122 (diff)
When inside Docker, output saved configuration during mastodon:setup (#6711)
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/mastodon.rake8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake
index 0b011bf57..d6c9e2d01 100644
--- a/lib/tasks/mastodon.rake
+++ b/lib/tasks/mastodon.rake
@@ -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.'