add start.sh
This commit is contained in:
parent
559a9a9b65
commit
c236d3730b
@ -1,6 +1,8 @@
|
|||||||
FROM intelligentsearch/isearch_env:2.0
|
FROM intelligentsearch/isearch_env:2.0
|
||||||
COPY install.sh /root/install.sh
|
COPY install.sh /root/install.sh
|
||||||
|
COPY start.sh /root/start.sh
|
||||||
RUN /root/install.sh
|
RUN /root/install.sh
|
||||||
|
|
||||||
|
CMD ["/bin/bash", "/root/start.sh"]
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ cp $srcdir/src/search_local/index_storage/cache/dtcd bin
|
|||||||
cp $srcdir/src/search_local/index_storage/rocksdb_helper/rocksdb_helper bin
|
cp $srcdir/src/search_local/index_storage/rocksdb_helper/rocksdb_helper bin
|
||||||
cd bin
|
cd bin
|
||||||
chmod +x dtcd.sh
|
chmod +x dtcd.sh
|
||||||
./dtcd.sh start
|
|
||||||
|
|
||||||
mkdir -p $dstdir/index_storage/intelligent_index
|
mkdir -p $dstdir/index_storage/intelligent_index
|
||||||
cd $dstdir/index_storage/intelligent_index
|
cd $dstdir/index_storage/intelligent_index
|
||||||
@ -31,7 +30,6 @@ cp $srcdir/src/search_local/index_storage/cache/dtcd bin
|
|||||||
cp $srcdir/src/search_local/index_storage/rocksdb_helper/rocksdb_helper bin
|
cp $srcdir/src/search_local/index_storage/rocksdb_helper/rocksdb_helper bin
|
||||||
cd bin
|
cd bin
|
||||||
chmod +x dtcd.sh
|
chmod +x dtcd.sh
|
||||||
./dtcd.sh start
|
|
||||||
|
|
||||||
mkdir -p $dstdir/index_storage/original_data
|
mkdir -p $dstdir/index_storage/original_data
|
||||||
cd $dstdir/index_storage/original_data
|
cd $dstdir/index_storage/original_data
|
||||||
@ -42,7 +40,6 @@ cp $srcdir/resource/dtcd.sh bin
|
|||||||
cp $srcdir/src/search_local/index_storage/cache/dtcd bin
|
cp $srcdir/src/search_local/index_storage/cache/dtcd bin
|
||||||
cd bin
|
cd bin
|
||||||
chmod +x dtcd.sh
|
chmod +x dtcd.sh
|
||||||
./dtcd.sh start
|
|
||||||
|
|
||||||
ln -s $dstdir/src/search_local/index_storage/api/c_api_cc/libdtc-gcc-4.8-r4646582.so /lib64/libdtc.so.1
|
ln -s $dstdir/src/search_local/index_storage/api/c_api_cc/libdtc-gcc-4.8-r4646582.so /lib64/libdtc.so.1
|
||||||
cd $dstdir
|
cd $dstdir
|
||||||
@ -52,8 +49,6 @@ mkdir log bin stat conf
|
|||||||
cp $srcdir/resource/index_write/conf/{index_gen.json,index_write.conf,localCluster.json} conf
|
cp $srcdir/resource/index_write/conf/{index_gen.json,index_write.conf,localCluster.json} conf
|
||||||
cp $srcdir/resource/{app_field_define.json,character_map.txt,msr_training.utf8,phonetic_base.txt,phonetic_map.txt,stop_words.dict,words_base.txt} conf
|
cp $srcdir/resource/{app_field_define.json,character_map.txt,msr_training.utf8,phonetic_base.txt,phonetic_map.txt,stop_words.dict,words_base.txt} conf
|
||||||
cp $srcdir/src/search_local/index_write/bin/index_write bin
|
cp $srcdir/src/search_local/index_write/bin/index_write bin
|
||||||
cd bin
|
|
||||||
./index_write
|
|
||||||
|
|
||||||
cd $dstdir/index_read
|
cd $dstdir/index_read
|
||||||
mkdir log bin stat conf data
|
mkdir log bin stat conf data
|
||||||
@ -62,21 +57,14 @@ cp $srcdir/resource/{intelligent_match.txt,msr_training.utf8,phonetic_base.txt,p
|
|||||||
cp $srcdir/resource/index_read/conf/{index_read.conf,cache.conf,table.conf} conf
|
cp $srcdir/resource/index_read/conf/{index_read.conf,cache.conf,table.conf} conf
|
||||||
cp $srcdir/resource/index_read/data/{analyze_data,relate_data,sensitive_data,synonym_data} data
|
cp $srcdir/resource/index_read/data/{analyze_data,relate_data,sensitive_data,synonym_data} data
|
||||||
cp $srcdir/src/search_local/index_read/bin/index_read bin
|
cp $srcdir/src/search_local/index_read/bin/index_read bin
|
||||||
cd bin
|
|
||||||
./index_read
|
|
||||||
|
|
||||||
cd $dstdir/search_agent
|
cd $dstdir/search_agent
|
||||||
mkdir log bin conf
|
mkdir log bin conf
|
||||||
cp $srcdir/resource/search_agent/conf/sa.conf conf
|
cp $srcdir/resource/search_agent/conf/sa.conf conf
|
||||||
cp $srcdir/src/search_agent/bin/search_agent bin/
|
cp $srcdir/src/search_agent/bin/search_agent bin/
|
||||||
cd bin
|
|
||||||
./search_agent -d -c ../conf/sa.conf -v 3
|
|
||||||
|
|
||||||
yum install -y jq
|
yum install -y jq
|
||||||
cd /usr/local/isearch
|
cd /usr/local/isearch
|
||||||
mkdir tools
|
mkdir tools
|
||||||
cp $srcdir/resource/tools/* tools
|
cp $srcdir/resource/tools/* tools
|
||||||
cd tools
|
|
||||||
sh load_data.sh
|
|
||||||
sh query.sh
|
|
||||||
|
|
||||||
|
31
dockerfiles/start.sh
Normal file
31
dockerfiles/start.sh
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
#初始化
|
||||||
|
INIT(){
|
||||||
|
cd /usr/local/isearch/index_storage/inverted_index/bin
|
||||||
|
./dtcd.sh start
|
||||||
|
cd /usr/local/isearch/index_storage/intelligent_index/bin
|
||||||
|
./dtcd.sh start
|
||||||
|
cd /usr/local/isearch/index_storage/original_data/bin
|
||||||
|
./dtcd.sh start
|
||||||
|
cd /usr/local/isearch/index_write/bin
|
||||||
|
./index_write
|
||||||
|
cd /usr/local/isearch/index_read/bin
|
||||||
|
./index_read
|
||||||
|
cd /usr/local/isearch/search_agent/bin
|
||||||
|
./search_agent -d -c ../conf/sa.conf -v 3
|
||||||
|
}
|
||||||
|
|
||||||
|
#守护脚本
|
||||||
|
PROCESS_DAEMON(){
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
/usr/sbin/sshd -D &
|
||||||
|
INIT
|
||||||
|
PROCESS_DAEMON
|
Loading…
Reference in New Issue
Block a user