Remove localhost patch and update instruction

Since the immich-native project was born, upstream now properly reads and
honors IMMICH_HOST.

Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
This commit is contained in:
Juhyung Park
2025-04-01 13:44:28 +09:00
parent 73862db50c
commit 16ae8c56b0
2 changed files with 1 additions and 10 deletions

View File

@@ -60,15 +60,6 @@ cd $TMP
git reset --hard $REV
rm -rf .git
# Use 127.0.0.1
find . -type f \( -name '*.ts' -o -name '*.js' \) -exec grep app.listen {} + | \
sed 's/.*app.listen//' | grep -v '()' | grep '^(' | \
tr -d "[:blank:]" | awk -F"[(),]" '{print $2}' | sort | uniq | while read port; do
find . -type f \( -name '*.ts' -o -name '*.js' \) -exec sed -i -e "s@app.listen(${port})@app.listen(${port}, '127.0.0.1')@g" {} +
done
find . -type f \( -name '*.ts' -o -name '*.js' \) -exec sed -i -e "s@PrometheusExporter({ port })@PrometheusExporter({ host: '127.0.0.1', port: port })@g" {} +
grep -RlE "\"0\.0\.0\.0\"|'0\.0\.0\.0'" | xargs -n1 sed -i -e "s@'0\.0\.0\.0'@'127.0.0.1'@g" -e 's@"0\.0\.0\.0"@"127.0.0.1"@g'
# Replace /usr/src
grep -Rl /usr/src | xargs -n1 sed -i -e "s@/usr/src@$IMMICH_PATH@g"
mkdir -p $IMMICH_PATH/cache