Skip to content

Commit c1d12e1

Browse files
Corgi14haobibo
andauthored
update code for casdoor build - temp fix (#39)
* update code * Update tool.sh * fix: add missing newline characters * Update searxng.Dockerfile * debug casdoor build * debug casdoor build script syntax * debug casdoor build script syntax * debug casdoor build script syntax * debug casdoor build script syntax * debug casdoor build script syntax * Use GITHUB_REPOSITORY for CI_PROJECT_NAME --------- Co-authored-by: Bibo Hao <[email protected]>
1 parent 44373e6 commit c1d12e1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docker_casdoor/work/script-setup-casdoor.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ setup_casdoor() {
99
&& URL_CASDOOR="https://github.com/casdoor/casdoor/archive/refs/tags/v${VER_CASDOOR}.tar.gz" \
1010
&& echo "Downloading casdoor version ${VER_CASDOOR} from: ${URL_CASDOOR}" \
1111
&& install_tar_gz $URL_CASDOOR \
12-
&& mv /opt/casdoor-* /tmp/casdoor && mkdir -pv /opt/casdoor/web/build /opt/casdoor/conf
12+
&& mv /opt/casdoor-* /tmp/casdoor \
13+
&& sed -i '/userId := user.GetId()/a\ c.SetSessionUsername(userId)' /tmp/casdoor/controllers/account.go \
14+
&& sed -i 's|paidUserName != c.GetSessionUsername()|userId != c.GetSessionUsername()|' /tmp/casdoor/controllers/product.go \
15+
&& mkdir -pv /opt/casdoor/web/build /opt/casdoor/conf
1316

1417
echo "--> Building Backend..." \
1518
&& cd /tmp/casdoor && ./build.sh \

docker_searxng/searxng.Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ RUN set -eux \
1313
&& adduser -uid ${SEARXNG_UID} --disabled-password --home /opt/searxng -shell /bin/bash --ingroup searxng searxng \
1414
&& usermod -aG root searxng \
1515
&& apt-get -qq update -yq --fix-missing && apt-get -qq install -yq --no-install-recommends \
16-
liblzma-dev libxslt-dev zlib1g-dev libffi-dev libssl-dev \
16+
libxslt-dev zlib1g-dev libffi-dev libssl-dev liblzma-dev \
17+
&& pip install -U pyyaml uwsgi \
1718
&& cd /opt/searxng \
1819
&& git config --global --add safe.directory /opt/searxng \
1920
&& git init && git remote add origin https://github.com/searxng/searxng \

0 commit comments

Comments
 (0)