install mastodon

This commit is contained in:
Antonio J. Delgado 2023-11-28 11:07:31 +02:00
parent fc60f244bc
commit 68c6b25205

View file

@ -181,17 +181,10 @@ class mastodon (
command => '/usr/local/bin/install_ruby.sh',
# user => $mastodon_user,
# cwd => "${mastodon_home}/.rbenv/",
creates => "${mastodon_home}/.rbenv/versions/3.2.2/bin/ruby",
creates => "${mastodon_home}/.rbenv/versions/3.2.2/bin/bundler",
timeout => 0,
require => File['/usr/local/bin/install_ruby.sh'],
}
# exec { 'install_bundler':
# command => 'gem install bundler --no-document',
# user => $mastodon_user,
# cwd => "${mastodon_home}/.rbenv/",
# # creates => '',
# require => Vcsrepo['ruby_build'],
# }
postgresql::server::db { 'mastodon':
user => 'mastodon',
password => postgresql::postgresql_password('mastodon', $db_password),
@ -205,34 +198,34 @@ class mastodon (
group => $mastodon_group,
require => User[$mastodon_user],
}
# exec { 'config_deployment':
# command => 'bundle config deployment \'true\'',
# user => $mastodon_user,
# cwd => "${mastodon_home}/live",
# # creates => "${mastodon_home}/.rbenv/libexec/rbenv-realpath.dylib",
# require => Rvm_gemset['bundler'],
# }
# exec { 'config_without_devel_test':
# command => 'bundle config without \'development test\'',
# user => $mastodon_user,
# cwd => "${mastodon_home}/live",
# # creates => "${mastodon_home}/.rbenv/libexec/rbenv-realpath.dylib",
# require => Exec['config_deployment'],
# }
# exec { 'bundle_install':
# command => 'bundle install -j$(getconf _NPROCESSORS_ONLN)',
# path => '/usr/sbin:/usr/bin:/sbin:/bin',
# user => $mastodon_user',
# cwd => "${mastodon_home}/live",
# # creates => "${mastodon_home}/.rbenv/libexec/rbenv-realpath.dylib",
# require => Exec['config_without_devel_test'],
# }
# exec { 'yarn_install':
# command => 'yarn install --pure-lockfile',
# path => '/usr/sbin:/usr/bin:/sbin:/bin',
# user => $mastodon_user,
# cwd => "${mastodon_home}/live",
# # creates => "${mastodon_home}/.rbenv/libexec/rbenv-realpath.dylib",
# require => Exec['bundle_install'],
# }
exec { 'config_deployment':
command => "${mastodon_home}/live/bin/bundle config deployment 'true'",
user => $mastodon_user,
cwd => "${mastodon_home}/live",
# creates => "${mastodon_home}/.rbenv/libexec/rbenv-realpath.dylib",
require => Rvm_gemset['bundler'],
}
exec { 'config_without_devel_test':
command => "${mastodon_home}/live/bin/bundle config without 'development test'",
user => $mastodon_user,
cwd => "${mastodon_home}/live",
# creates => "${mastodon_home}/.rbenv/libexec/rbenv-realpath.dylib",
require => Exec['config_deployment'],
}
exec { 'bundle_install':
command => "${mastodon_home}/live/bin/bundle install -j$(getconf _NPROCESSORS_ONLN)",
path => '/usr/sbin:/usr/bin:/sbin:/bin',
user => $mastodon_user,
cwd => "${mastodon_home}/live",
# creates => "${mastodon_home}/.rbenv/libexec/rbenv-realpath.dylib",
require => Exec['config_without_devel_test'],
}
exec { 'yarn_install':
command => "${mastodon_home}/live/bin/yarn install --pure-lockfile",
path => '/usr/sbin:/usr/bin:/sbin:/bin',
user => $mastodon_user,
cwd => "${mastodon_home}/live",
# creates => "${mastodon_home}/.rbenv/libexec/rbenv-realpath.dylib",
require => Exec['bundle_install'],
}
}