mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-17 04:36:23 +00:00
fix: cambiar las direcciones de sincronización a rsyncd
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
79fd1b7fbb
commit
a6bba8c3cb
1 changed files with 22 additions and 0 deletions
22
db/migrate/20230421182627_change_full_rsync_destination.rb
Normal file
22
db/migrate/20230421182627_change_full_rsync_destination.rb
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Envía los cambios a través de rsyncd
|
||||||
|
class ChangeFullRsyncDestination < ActiveRecord::Migration[6.1]
|
||||||
|
def up
|
||||||
|
DeployFullRsync.find_each do |deploy|
|
||||||
|
Rails.application.nodes.each do |node|
|
||||||
|
deploy.destination = "rsync://#{node}/deploys/"
|
||||||
|
deploy.save
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
DeployFullRsync.find_each do |deploy|
|
||||||
|
Rails.application.nodes.each do |node|
|
||||||
|
deploy.destination = "sutty@#{node}:"
|
||||||
|
deploy.save
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue