Skip to content

Commit

Permalink
updated go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed Jun 9, 2022
1 parent b320852 commit 11961c2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 29 deletions.
2 changes: 1 addition & 1 deletion backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module crawlab

go 1.16

require github.com/crawlab-team/crawlab-core v0.6.0-7
require github.com/crawlab-team/crawlab-core v0.6.1-0.20220609124710-a6fcaa2e7ea6
8 changes: 6 additions & 2 deletions backend/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,12 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/crawlab-team/crawlab-core v0.0.1/go.mod h1:6dJHMvrmIJbfYHhYNeGZkGOLEBvur+yGiFzLCRXx92k=
github.com/crawlab-team/crawlab-core v0.6.0-7 h1:23kTlKOZ3OqfSmD+SYJiwlqP1Cu1NJtPmbR8KeIGvgw=
github.com/crawlab-team/crawlab-core v0.6.0-7/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0=
github.com/crawlab-team/crawlab-core v0.6.0-8 h1:P1l8dBdecZ6vVxwWwOwjLtCUriSNyBAe01Ghwfndoqw=
github.com/crawlab-team/crawlab-core v0.6.0-8/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0=
github.com/crawlab-team/crawlab-core v0.6.0-9 h1:oBwtAzafOVl2r2vLbLYClgpXDViwVVzqdXnbwC2aGj4=
github.com/crawlab-team/crawlab-core v0.6.0-9/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0=
github.com/crawlab-team/crawlab-core v0.6.1-0.20220609124710-a6fcaa2e7ea6 h1:DGXTxMCJhLZkbBZcwHE6wisUO96nsy5rTlV7e9pQ+Kg=
github.com/crawlab-team/crawlab-core v0.6.1-0.20220609124710-a6fcaa2e7ea6/go.mod h1:KqfjSkEclVY39nC58bsq3MLcuXbDnsPp/ClcBDkqOF0=
github.com/crawlab-team/crawlab-db v0.0.2/go.mod h1:o7o4rbcyAWlFGHg9VS7V7tM/GqRq+N2mnAXO71cZA78=
github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300 h1:2EymVIiOspX28qNC1Qon3W1fzXKQ8hi6ho3QtXB4w6k=
github.com/crawlab-team/crawlab-db v0.6.0-beta.20220417.1300/go.mod h1:gfeF0nAnFuup6iYvgHkY0in/HpO/+JktXqVNMdhoxhU=
Expand Down
12 changes: 6 additions & 6 deletions bin/docker-init.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

if [ "${CRAWLAB_NODE_MASTER}" = "Y" ]; then
# start master
/bin/bash /app/bin/docker-start-master.sh
# start master
/bin/bash /app/bin/docker-start-master.sh

# start crawlab
crawlab-server master
# start crawlab
crawlab-server master
else
# start crawlab
crawlab-server worker
# start crawlab
crawlab-server worker
fi
41 changes: 21 additions & 20 deletions bin/docker-start-master.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
#!/bin/bash

# replace env
indexpath=/app/dist/index.html
if test -z "$CRAWLAB_BASE_URL"; then
:
:
else
sed -i "s?/js/?${CRAWLAB_BASE_URL}/js/?g" ${indexpath}
sed -i "s?/css/?${CRAWLAB_BASE_URL}/css/?g" ${indexpath}
sed -i "s/ <link rel=\"icon\" type=\"image\/x-icon\" href=\"/ <link rel=\"icon\" type=\"image\/x-icon\" href=\"\/${CRAWLAB_BASE_URL}/g" ${indexpath}
sed -i "s/ <link rel=\"stylesheet\" href=\"/ <link rel=\"stylesheet\" href=\"${CRAWLAB_BASE_URL}\//g" ${indexpath}
sed -i "s/ window.VUE_APP_API_BASE_URL = '/ window.VUE_APP_API_BASE_URL = '\/${CRAWLAB_BASE_URL}/g" ${indexpath}
sed -i "s?/js/?${CRAWLAB_BASE_URL}/js/?g" ${indexpath}
sed -i "s?/css/?${CRAWLAB_BASE_URL}/css/?g" ${indexpath}
sed -i "s/ <link rel=\"icon\" type=\"image\/x-icon\" href=\"/ <link rel=\"icon\" type=\"image\/x-icon\" href=\"\/${CRAWLAB_BASE_URL}/g" ${indexpath}
sed -i "s/ <link rel=\"stylesheet\" href=\"/ <link rel=\"stylesheet\" href=\"${CRAWLAB_BASE_URL}\//g" ${indexpath}
sed -i "s/ window.VUE_APP_API_BASE_URL = '/ window.VUE_APP_API_BASE_URL = '\/${CRAWLAB_BASE_URL}/g" ${indexpath}
fi
if test -z "$CRAWLAB_INIT_BAIDU_TONGJI"; then
:
:
else
sed -i "s/ window.VUE_APP_INIT_BAIDU_TONGJI = ''/ window.VUE_APP_INIT_BAIDU_TONGJI = '${CRAWLAB_INIT_BAIDU_TONGJI}'/g" ${indexpath}
sed -i "s/ window.VUE_APP_INIT_BAIDU_TONGJI = ''/ window.VUE_APP_INIT_BAIDU_TONGJI = '${CRAWLAB_INIT_BAIDU_TONGJI}'/g" ${indexpath}
fi
if test -z "$CRAWLAB_INIT_UMENG"; then
:
:
else
sed -i "s/ window.VUE_APP_INIT_UMENG = ''/ window.VUE_APP_INIT_UMENG = '${CRAWLAB_INIT_UMENG}'/g" ${indexpath}
sed -i "s/ window.VUE_APP_INIT_UMENG = ''/ window.VUE_APP_INIT_UMENG = '${CRAWLAB_INIT_UMENG}'/g" ${indexpath}
fi

# start nginx
Expand All @@ -26,16 +28,15 @@ service nginx start
# start seaweedfs server
seaweedfsDataPath=/data/seaweedfs
if [ -e ${seaweedfsDataPath} ]; then
:
:
else
mkdir -p ${seaweedfsDataPath}
mkdir -p ${seaweedfsDataPath}
fi
weed server \
-dir /data \
-master.dir ${seaweedfsDataPath} \
-volume.dir.idx ${seaweedfsDataPath} \
-ip localhost \
-volume.port 9999 \
-filer \
>> /var/log/weed.log 2>&1 &

-dir /data \
-master.dir ${seaweedfsDataPath} \
-volume.dir.idx ${seaweedfsDataPath} \
-ip localhost \
-volume.port 9999 \
-filer \
>>/var/log/weed.log 2>&1 &

0 comments on commit 11961c2

Please sign in to comment.