123456789_123456789_123456789_123456789_123456789_

Class: Rails::Generators::Database::PostgreSQL

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Rails::Generators::Database
Defined in: railties/lib/rails/generators/database.rb

Constant Summary

::Rails::Generators::Database - Inherited

DATABASES

Class Method Summary

Instance Method Summary

Instance Method Details

#base_package

[ GitHub ]

  
# File 'railties/lib/rails/generators/database.rb', line 159

def base_package
  "postgresql-client"
end

#build_package

[ GitHub ]

  
# File 'railties/lib/rails/generators/database.rb', line 163

def build_package
  "libpq-dev"
end

#feature_name

[ GitHub ]

  
# File 'railties/lib/rails/generators/database.rb', line 167

def feature_name
  "ghcr.io/rails/devcontainer/features/postgres-client"
end

#gem

[ GitHub ]

  
# File 'railties/lib/rails/generators/database.rb', line 155

def gem
  ["pg", ["~> 1.1"]]
end

#name

[ GitHub ]

  
# File 'railties/lib/rails/generators/database.rb', line 134

def name
  "postgres"
end

#port

[ GitHub ]

  
# File 'railties/lib/rails/generators/database.rb', line 151

def port
  5432
end

#service

[ GitHub ]

  
# File 'railties/lib/rails/generators/database.rb', line 138

def service
  {
    "image" => "postgres:16.1",
    "restart" => "unless-stopped",
    "networks" => ["default"],
    "volumes" => ["postgres-data:/var/lib/postgresql/data"],
    "environment" => {
      "POSTGRES_USER" => "postgres",
      "POSTGRES_PASSWORD" => "postgres"
    }
  }
end