Class: Rails::Generators::Database::MariaDB

Inherits:
Rails::Generators::Database show all
Includes:
MySqlSocket
Defined in:
lib/rails/generators/database.rb

Constant Summary

Constants inherited from Rails::Generators::Database

DATABASES

Instance Method Summary collapse

Methods included from MySqlSocket

#host, #socket

Methods inherited from Rails::Generators::Database

all, build, #feature, #host, #socket, #volume

Instance Method Details

#base_packageObject



199
200
201
# File 'lib/rails/generators/database.rb', line 199

def base_package
  nil
end

#build_packageObject



203
204
205
# File 'lib/rails/generators/database.rb', line 203

def build_package
  nil
end

#feature_nameObject



207
208
209
# File 'lib/rails/generators/database.rb', line 207

def feature_name
  nil
end

#gemObject



195
196
197
# File 'lib/rails/generators/database.rb', line 195

def gem
  ["trilogy", ["~> 2.7"]]
end

#nameObject



175
176
177
# File 'lib/rails/generators/database.rb', line 175

def name
  "mariadb"
end

#portObject



191
192
193
# File 'lib/rails/generators/database.rb', line 191

def port
  3306
end

#serviceObject



179
180
181
182
183
184
185
186
187
188
189
# File 'lib/rails/generators/database.rb', line 179

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