rider icon indicating copy to clipboard operation
rider copied to clipboard

local-up.sh 不能直接执行,需要退到 rider 目录下执行

Open ad-c2-4ytzbz6zsd opened this issue 1 year ago • 1 comments

直接执行

❯
❯ sh local-up.sh
make: *** No rule to make target `build'.  Stop.
❯
❯ pwd
/xxx/rider/examples/body_to_header_to_refresh

make报错找不到规则, 即 makefile 文件

建议直接在 local-up.sh 中指定 makefile 路径, 就不用退出来执行了

#! /bin/bash

set -o errexit
set -o nounset
set -o pipefail

BASE_ENVOY_IMAGE=${BASE_ENVOY_IMAGE:-"hangoio/envoy-proxy:v0.0.1-b9696c2"}

BASE_IMAGE=${BASE_ENVOY_IMAGE} IMAGE_TAG=rider:local-dev make -C ../../ build

FORCE_BUILD=0
if [[ $# -gt 0 ]]; then
    if [[ $1 == "-f" ]]; then
        FORCE_BUILD=1
    fi
fi

if [[ $FORCE_BUILD == "1" ]]; then
    docker-compose -f docker-compose.yaml up --build
else
    docker-compose -f docker-compose.yaml up
fi

当前目录下直接执行

❯ pwd
/xxx/rider/examples/body_to_header_to_refresh
❯ 
❯ nohup sh local-up.sh > rider.log 2>&1 &
[1] 63892
❯

ad-c2-4ytzbz6zsd avatar Jun 20 '23 09:06 ad-c2-4ytzbz6zsd

local-down.sh 也需要调整下

#! /bin/bash

set -o errexit
set -o nounset
set -o pipefail

docker-compose down

ad-c2-4ytzbz6zsd avatar Jun 20 '23 11:06 ad-c2-4ytzbz6zsd