forked from mj/devopsscripts
增加自动注入xxljob配置
This commit is contained in:
@@ -192,10 +192,10 @@ run() {
|
||||
checkOrCreate_network
|
||||
containerLogPath=/usr/local/$COMPANY_NAME/logs
|
||||
PREFIX=${PROJECT_NAME##*-}
|
||||
XXLJOB_LABEL="--label \"traefik.enable=true\" \
|
||||
--label \"traefik.http.routers.${PREFIX}-router.rule=PathPrefix(\`/${PREFIX}\`)\" \
|
||||
--label \"traefik.http.routers.${PREFIX}-router.entrypoints=xxljob\" \
|
||||
--label \"traefik.http.services.${PREFIX}-service.loadbalancer.server.port=9999\""
|
||||
XXLJOB_LABEL="--label traefik.enable=true \
|
||||
--label traefik.http.routers.${PREFIX}-router.rule=PathPrefix(\`/${PREFIX}\`) \
|
||||
--label traefik.http.routers.${PREFIX}-router.entrypoints=xxljob \
|
||||
--label traefik.http.services.${PREFIX}-service.loadbalancer.server.port=9999"
|
||||
if [ -e "$(pwd)/.env" ];then
|
||||
docker run -d -v /etc/localtime:/etc/localtime:ro --env-file .env $(port_map_processor) -v $LOG_PATH:$containerLogPath --network=$NETWORK_NAME $XXLJOB_LABEL --restart=always --name $PROJECT_NAME $latestImageId
|
||||
echo "启动命令为: docker run -d -v /etc/localtime:/etc/localtime:ro --env-file .env $(port_map_processor) -v $LOG_PATH:$containerLogPath --network=$NETWORK_NAME $XXLJOB_LABEL --restart=always --name $PROJECT_NAME $latestImageId"
|
||||
|
||||
Reference in New Issue
Block a user