Add script to demo search-server's docker usage.

This commit is contained in:
Sergio Martínez Portela 2022-10-03 00:50:40 +02:00
parent 14d7d0f85e
commit 7fdf378cee

15
scripts/search-server.sh Normal file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -eu
PORT=${PORT:-3001}
cd "$(dirname "$0")/search-server"
docker build -t search-server .
cd ../../_gen/notes/
set -x
exec docker run -it --rm -p $PORT:80 -e PORT=80 -e DB_PATH=/db.sqlite3 -v `pwd`/db.sqlite3:/db.sqlite3:ro search-server