diff --git a/app/makelist.pl b/app/makelist.pl new file mode 100755 index 0000000..d7502d9 --- /dev/null +++ b/app/makelist.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl +use strict; +my $file = $ARGV[0] || $ENV{'WEBROOT'} . '/images.txt'; + +open(IN, $file) || die "Unable to read '$file': $!\n"; +while(my $line=) { + chomp($line); + + if(my($id,$num,$hr)=$line=~/.+\/(.+)_(\d+)_HR\..+$/) { + print join(',',$id,$num,'HR',$line), "\n"; + } elsif(my($id,$num)=$line=~/.+\/(.+)_(\d+)\..+$/) { + print join(',',$id,$num,'LR',$line),"\n"; + } else { + warn "Invalid line? '$line'\n"; + } +} +close(IN); \ No newline at end of file diff --git a/app/update_rsr_images b/app/update_rsr_images index b96c11e..0dae1c5 100755 --- a/app/update_rsr_images +++ b/app/update_rsr_images @@ -19,6 +19,7 @@ done echo Download complete at `date` find $WEBROOT/images -type f | perl -pe 's/^\/var\/www//' | sort > $WEBROOT/images.txt +/opt/app/makelist.pl > $WEBROOT/images.csv echo Done at `date` echo diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6ce1a10 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3.9" + +services: + www: + image: dockerm.rymon.net:5000/trmstatic + build: . + ports: + - 10080:80 + environment: + - TZ=America/New_York + volumes: + - ./www:/var/www \ No newline at end of file