Skip to content

Commit

Permalink
recover from database.yml parse failures
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Oct 19, 2024
1 parent 71f7fcc commit 05cd94a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/generators/dockerfile_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ def compose_web_volumes
volumes = %w[ log storage ]

if deploy_database == "sqlite3"
database = YAML.load_file("config/database.yml", aliases: true).dig("production", "database")
database = YAML.load_file("config/database.yml", aliases: true).dig("production", "database") rescue nil
if database && database =~ /^\w/
volumes << File.dirname(database)
end
Expand Down

0 comments on commit 05cd94a

Please sign in to comment.