@@ -38,6 +38,7 @@ BROWSER_DETECTOR_VERSION = "4.1.0"
3838HLS_VERSION = " 1.5.15"
3939MEDIA_CAPTIONS_VERSION = " 1.0.4"
4040MEDIA_ICONS_VERSION = " 1.1.5"
41+ METASEARCH_VERSION = " 37dc3364731f3a62c554f2d19160c22bd5f260fe"
4142P2P_MEDIA_LOADER_VERSION = " 2.0.1"
4243RNOSTR_VERSION = " 0.4.8"
4344RUST_VERSION = " 1.86.0"
@@ -54,7 +55,7 @@ OPUS_BITRATE_KBPS = 256
5455BANDWIDTH_MB_PER_SEC = 20
5556IGNORE_HOSTS = [" personal.tracker.com" , " tracker.novage.com.ua" , " www.googletagmanager.com" ]
5657
57- CERTBOT_DOMAINS = [" media.codonaft.com " , " nostr.codonaft.com " , " test. codonaft.com" ]
58+ CERTBOT_DOMAINS = [" media" , " nostr" , " metasearch " , " test" ].map { | i | " #{ i } . codonaft.com" }
5859
5960MAIN_SITE_CONFIG = Path [" _config.yml" ]
6061
@@ -243,6 +244,14 @@ def build
243244 dependencies: [" g++" , " openssl-dev" , " openssl-libs-static" ],
244245 )
245246
247+ build_rust_app(
248+ MEDIA_HOST ,
249+ crate: " metasearch" ,
250+ branch: " master" ,
251+ git: URI .parse(" https://github.com/mat-1/metasearch2" ),
252+ version: METASEARCH_VERSION ,
253+ )
254+
246255 generate_certbot_script(MEDIA_HOST )
247256end
248257
@@ -262,7 +271,7 @@ def start
262271 end
263272 step(" start" )
264273 start_openrc(MIRROR_HOST , services: [" i2pd" , " local" , " nginx" , " tor" ])
265- start_openrc(MEDIA_HOST , services: [" aquatic_ws" , " broadcastr" , " rnostr" , " i2pd" , " local" , " nginx" , " tor" ])
274+ start_openrc(MEDIA_HOST , services: [" aquatic_ws" , " broadcastr" , " metasearch " , " rnostr" , " i2pd" , " local" , " nginx" , " tor" ])
266275end
267276
268277def encode_media (input : String , config : YAML ::Any , language : String )
671680def generate_certbot_script (host )
672681 domains = CERTBOT_DOMAINS .join(',' )
673682 user = ssh(host, [" echo -n ${USER}" ])
683+ raise " unexpected username" if user.empty?
684+
674685 home_dir = BUILD_DIR .join(host).join(" home" ).join(user)
675686 cron_dir = home_dir.join(" .periodic/weekly" )
676687 output = cron_dir.join(" certbot-prod.sh" )
@@ -987,8 +998,12 @@ def build_rust_app(
987998 raise " unspecified version" if version.nil?
988999 " #{ crate } --version #{ version } "
9891000 else
990- raise " either version or branch is allowed" if ! version.nil? && ! branch.nil?
991- version = version.nil? ? " " : " --tag #{ version } "
1001+ version =
1002+ if version.nil?
1003+ " "
1004+ else
1005+ branch.nil? ? " --tag #{ version } " : " --rev #{ version } "
1006+ end
9921007 branch = branch.nil? ? " " : " --branch #{ branch } "
9931008 " --git #{ git } #{ version } #{ branch } "
9941009 end
0 commit comments