@@ -54,7 +54,7 @@ OPUS_BITRATE_KBPS = 256
5454BANDWIDTH_MB_PER_SEC = 20
5555IGNORE_HOSTS = [" personal.tracker.com" , " tracker.novage.com.ua" , " www.googletagmanager.com" ]
5656
57- CERTBOT_DOMAINS = [" media.codonaft.com " , " nostr.codonaft.com " , " test. codonaft.com" ]
57+ CERTBOT_DOMAINS = [" media" , " nostr" , " metasearch " , " test" ].map { | i | " #{ i } . codonaft.com" }
5858
5959MAIN_SITE_CONFIG = Path [" _config.yml" ]
6060
@@ -243,6 +243,13 @@ def build
243243 dependencies: [" g++" , " openssl-dev" , " openssl-libs-static" ],
244244 )
245245
246+ build_rust_app(
247+ MEDIA_HOST ,
248+ crate: " metasearch" ,
249+ branch: " large-images" ,
250+ git: URI .parse(" https://github.com/alopatindev/metasearch2" ),
251+ )
252+
246253 generate_certbot_script(MEDIA_HOST )
247254end
248255
@@ -262,7 +269,7 @@ def start
262269 end
263270 step(" start" )
264271 start_openrc(MIRROR_HOST , services: [" i2pd" , " local" , " nginx" , " tor" ])
265- start_openrc(MEDIA_HOST , services: [" aquatic_ws" , " broadcastr" , " rnostr" , " i2pd" , " local" , " nginx" , " tor" ])
272+ start_openrc(MEDIA_HOST , services: [" aquatic_ws" , " broadcastr" , " metasearch " , " rnostr" , " i2pd" , " local" , " nginx" , " tor" ])
266273end
267274
268275def encode_media (input : String , config : YAML ::Any , language : String )
671678def generate_certbot_script (host )
672679 domains = CERTBOT_DOMAINS .join(',' )
673680 user = ssh(host, [" echo -n ${USER}" ])
681+ raise " unexpected username" if user.empty?
682+
674683 home_dir = BUILD_DIR .join(host).join(" home" ).join(user)
675684 cron_dir = home_dir.join(" .periodic/weekly" )
676685 output = cron_dir.join(" certbot-prod.sh" )
@@ -987,8 +996,12 @@ def build_rust_app(
987996 raise " unspecified version" if version.nil?
988997 " #{ crate } --version #{ version } "
989998 else
990- raise " either version or branch is allowed" if ! version.nil? && ! branch.nil?
991- version = version.nil? ? " " : " --tag #{ version } "
999+ version =
1000+ if version.nil?
1001+ " "
1002+ else
1003+ branch.nil? ? " --tag #{ version } " : " --rev #{ version } "
1004+ end
9921005 branch = branch.nil? ? " " : " --branch #{ branch } "
9931006 " --git #{ git } #{ version } #{ branch } "
9941007 end
@@ -1597,7 +1610,7 @@ def find_hosts(host : String?) : Array(String)
15971610 .split('\n' )
15981611 .map { |i | i.split(':' ) }
15991612 .select { |i | i.size > 2 }
1600- .map { |i | i[2 ].strip }
1613+ .map { |i | i[2 ].strip.sub( /^ \. / , " " ) }
16011614 .reject { |i | i.empty? }
16021615 .to_set
16031616 (result + [host].to_set).to_a
0 commit comments