Skip to content

Commit

Permalink
Fix mastodon:setup to take dotenv/docker-compose differences into acc…
Browse files Browse the repository at this point in the history
…ount (mastodon#16896)

In order to work around mastodon#16895,
add a warning to .env.production.sample, and change the mastodon:setup rake
task to:
- output a warning if a variable will be interpreted differently by dotenv
  and docker-compose
- ensure the printed config is compatible with docker-compose
  • Loading branch information
ClearlyClaire authored and jesseplusplus committed Feb 10, 2022
1 parent f9c0afc commit fad4cd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/tasks/mastodon.rake
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,11 @@ namespace :mastodon do
end
end.join("\n")

generated_header = "# Generated with mastodon:setup on #{Time.now.utc}\n\n".dup
generated_header = "# Generated with mastodon:setup on #{Time.now.utc}\n\n"

if incompatible_syntax
generated_header << "# Some variables in this file will be interpreted differently whether you are\n"
generated_header << "# using docker-compose or not.\n\n"
generated_header << "Some variables in this file will be interpreted differently whether you are\n"
generated_header << "using docker-compose or not.\n\n"
end

File.write(Rails.root.join('.env.production'), "#{generated_header}#{env_contents}\n")
Expand Down

0 comments on commit fad4cd4

Please sign in to comment.