Module: Rails::Generators::Database::MariaDB

Included in:
MariaDBMySQL2, MariaDBTrilogy
Defined in:
lib/rails/generators/database.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



50
51
52
# File 'lib/rails/generators/database.rb', line 50

def name
  "mariadb"
end

#portObject



54
55
56
# File 'lib/rails/generators/database.rb', line 54

def port
  3306
end

#serviceObject



58
59
60
61
62
63
64
65
66
67
68
# File 'lib/rails/generators/database.rb', line 58

def service
  {
    "image" => "mariadb:10.5",
    "restart" => "unless-stopped",
    "networks" => ["default"],
    "volumes" => ["mariadb-data:/var/lib/mysql"],
    "environment" => {
      "MARIADB_ALLOW_EMPTY_ROOT_PASSWORD" => "true",
    },
  }
end