Class: Rails::Generators::Database::PostgreSQL
Constant Summary
DATABASES
Instance Method Summary
collapse
all, build, #feature, #host, #socket, #volume
Instance Method Details
#base_package ⇒ Object
196
197
198
|
# File 'lib/rails/generators/database.rb', line 196
def base_package
"postgresql-client"
end
|
#build_package ⇒ Object
200
201
202
|
# File 'lib/rails/generators/database.rb', line 200
def build_package
"libpq-dev"
end
|
#feature_name ⇒ Object
204
205
206
|
# File 'lib/rails/generators/database.rb', line 204
def feature_name
"ghcr.io/rails/devcontainer/features/postgres-client"
end
|
#gem ⇒ Object
192
193
194
|
# File 'lib/rails/generators/database.rb', line 192
def gem
["pg", ["~> 1.1"]]
end
|
#name ⇒ Object
167
168
169
|
# File 'lib/rails/generators/database.rb', line 167
def name
"postgres"
end
|
#port ⇒ Object
188
189
190
|
# File 'lib/rails/generators/database.rb', line 188
def port
5432
end
|
#service ⇒ Object
175
176
177
178
179
180
181
182
183
184
185
186
|
# File 'lib/rails/generators/database.rb', line 175
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
|
#template ⇒ Object
171
172
173
|
# File 'lib/rails/generators/database.rb', line 171
def template
"config/databases/postgresql.yml"
end
|