Skip to content

Commit

Permalink
Fix: quick start. fix command of 'docs > dubbo_sample_startup.sh '
Browse files Browse the repository at this point in the history
  • Loading branch information
yuefengbo committed Jun 18, 2021
1 parent 5429336 commit efff69f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
dubbo-go-pixiu
dubbo-go-pixiu.exe
dubbgo_server.out
samples/dubbogo/simple/server/app/app

/logs
/.idea
/.vscode
pkg/registry/zookeeper-4unittest/contrib/fatjar


20 changes: 12 additions & 8 deletions docs/sample/dubbo_sample_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,31 @@ if [ "$1" != "skip_zookeeper" ]; then
echo "zookeeper stated!"
fi


APP_PATH=../../samples/dubbogo/simple

go env -w GOPROXY=https://goproxy.cn,direct

echo "starting dubbogo provider!"
if [ -z "$CONF_PROVIDER_FILE_PATH" ]; then
export CONF_PROVIDER_FILE_PATH=../../samples/dubbogo/simple/server/config/server.yml
fi
go build ../../samples/dubbogo/simple/server/app/

provider_pid=$(ps -ef | grep ../../samples/dubbogo/simple/server/app/ | grep -v 'grep' | awk '{print $2}')
go build -o $APP_PATH/server/app/ $APP_PATH/server/app/

provider_pid=$(ps -ef | grep $APP_PATH/server/app/ | grep -v 'grep' | awk '{print $2}')

if [ -n "$provider_pid" ]; then
echo "pid of old dubbogo provider is $provider_pid, kill it"
kill -9 "$provider_pid"
fi
nohup go run ../../samples/dubbogo/simple/server/app/ >dubbgo_server.out &
nohup go run $APP_PATH/server/app/ >$APP_PATH/dubbgo_server.out &
sleep 10
echo "dubbogo provider started!"

## to start pixiu

echo "starting proxy!"

cd ../../

if [ -z "$CONF_PROVIDER_FILE_PATH" ]; then
export CONF_PROVIDER_FILE_PATH=samples/dubbogo/simple/server/profiles/test/server.yml
fi

make run config-path=samples/dubbogo/simple/proxy/conf.yaml api-config-path=samples/dubbogo/simple/proxy/api_config.yaml

0 comments on commit efff69f

Please sign in to comment.