diff --git a/install/open-archiver-install.sh b/install/open-archiver-install.sh index 53eba7fff..4c21e230e 100644 --- a/install/open-archiver-install.sh +++ b/install/open-archiver-install.sh @@ -23,6 +23,8 @@ fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary" fetch_and_deploy_gh_release "openarchiver" "LogicLabs-OU/OpenArchiver" "tarball" JWT_KEY="$(openssl rand -hex 32)" SECRET_KEY="$(openssl rand -hex 32)" +IP_ADDR=$(hostname -I | awk '{print $1}') + msg_info "Setting up PostgreSQL" DB_NAME="openarchiver_db" @@ -87,6 +89,8 @@ sed -i "s|^STORAGE_LOCAL_ROOT_PATH=.*|STORAGE_LOCAL_ROOT_PATH=/opt/openarchiver- sed -i "s|^JWT_SECRET=.*|JWT_SECRET=$JWT_KEY|g" /opt/openarchiver/.env sed -i "s|^ENCRYPTION_KEY=.*|ENCRYPTION_KEY=$SECRET_KEY|g" /opt/openarchiver/.env sed -i "s|^TIKA_URL=.*|TIKA_URL=|g" /opt/openarchiver/.env +IP_ADDR=$(hostname -I | awk '{print $1}') +echo "ORIGIN=http://$IP_ADDR:3000" >> /opt/openarchiver/.env $STD pnpm install --shamefully-hoist --frozen-lockfile --prod=false $STD pnpm build $STD pnpm db:migrate