Variable hostname

This commit is contained in:
Kuba Orlik 2022-04-24 18:47:08 +02:00
parent 51a4603db4
commit 684327c2bd
3 changed files with 11 additions and 3 deletions

View File

@ -12,8 +12,14 @@
docker image build -t headless-fox .
```
## Running
## Running a single analysis
```
docker run -i -v $PWD/static:/opt/static headless-fox ./script3.sh '{"url": "pearson.pl", "third_party_domains": ["hotjar.com", "cookielaw.org"]}' 123
BASE_URL=http://localhost:3000 docker run -i -v $PWD/static:/opt/static headless-fox ./script3.sh '{"url": "pearson.pl", "third_party_domains": ["hotjar.com", "cookielaw.org"]}' 123
```
## Running the server
```
BASE_URL=http://localhost:3000 node .
```

View File

@ -81,7 +81,7 @@ annotate_header(){
convert "$filename" "$overlay_filename" -compose Darken -composite "$annotated_filename.step.png"
convert "$annotated_filename.step.png" "$hardoverlay_filename" -compose src-over -composite "$annotated_filename"
rm "$overlay_filename" "$annotated_filename.step.png" "$hardoverlay_filename" "$cropped_filename" "$filename"
echo "SCREENSHOT: <img width=\"720\" height=\"405\" src=\"http://localhost:3000/$(echo "$annotated_filename" | sed 's|/opt/||')\"/>"
echo "SCREENSHOT: <img width=\"720\" height=\"405\" src=\"$BASE_URL/$(echo "$annotated_filename" | sed 's|/opt/||')\"/>"
}
#annotate_header "set-cookie" "identyfikator internetowy z cookie" "Cookie" "identyfikator internetowy z cookie"

View File

@ -144,6 +144,8 @@ while true; do
fi
done
sleep 3; # didn't work without it on the server for some reason
export DISPLAY=:$num
quiet || echo "Using display: $DISPLAY"