Skip to content

Commit

Permalink
update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Liuhaai committed Mar 20, 2024
1 parent 7c84e33 commit c6c343d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion witness-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine as build
FROM golang:1.20-alpine as build

WORKDIR apps/iotube-witness

Expand Down
2 changes: 1 addition & 1 deletion witness-service/Dockerfile.relayer
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine as build
FROM golang:1.20-alpine as build

WORKDIR apps/iotube-relayer

Expand Down
2 changes: 1 addition & 1 deletion witness-service/Dockerfile.witness
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine as build
FROM golang:1.20-alpine as build

WORKDIR apps/iotube-witness

Expand Down
8 changes: 8 additions & 0 deletions witness-service/start_relayer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ function downloadConfigFile() {
exit 2
fi
fi
if [[ ! -f ${IOTEX_RELAYER}/etc/relayer-config-bitcoin-testnet.yaml ]];then
cp -f $PROJECT_ABS_DIR/relayer-config-bitcoin-testnet.yaml ${IOTEX_RELAYER}/etc/relayer-config-bitcoin-testnet.yaml
if [ $? -ne 0 ];then
echo "Get config error"
exit 2
fi
fi
[[ -f ${IOTEX_RELAYER}/etc/.env ]] || (echo "IOTEX_RELAYER=$IOTEX_RELAYER" > ${IOTEX_RELAYER}/etc/.env;echo "DB_ROOT_PASSWORD=$DB_ROOT_PASSWORD" >> ${IOTEX_RELAYER}/etc/.env)
cp -f $PROJECT_ABS_DIR/crontab ${IOTEX_RELAYER}/etc/crontab
cp -f $PROJECT_ABS_DIR/backup_relayer ${IOTEX_RELAYER}/etc/backup
Expand Down Expand Up @@ -148,6 +155,7 @@ function grantPrivileges() {
popd
echo -e "$YELLOW Success! $NC"
docker exec relayer-db mysql -uroot -p${DB_ROOT_PASSWORD} -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'" > /dev/null 2>&1
docker exec relayer-db mysql -uroot -p${DB_ROOT_PASSWORD} -e "CREATE DATABASE relayer" > /dev/null 2>&1
$WHITE_LINE
touch $IOTEX_RELAYER/data/mysql/.inited
fi
Expand Down
2 changes: 2 additions & 0 deletions witness-service/start_witness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ function downloadConfigFile() {
copyFile "witness-config-bsc.secret.yaml" "witness-config-bsc.secret.yaml" 0
copyFile "witness-config-matic.yaml" "witness-config-matic.yaml" 1
copyFile "witness-config-matic.secret.yaml" "witness-config-matic.secret.yaml" 0
copyFile "witness-config-bitcoin-testnet.yaml" "witness-config-bitcoin-testnet.yaml" 1
copyFile "witness-config-bitcoin-testnet.secret.yaml" "witness-config-bitcoin-testnet.secret.yaml" 0
envFile=${IOTEX_WITNESS}/etc/.env
if [[ ! -f ${envFile} ]]; then
touch ${envFile}
Expand Down

0 comments on commit c6c343d

Please sign in to comment.