feat(deploy-mining): rebuild命令增加服务重启功能
rebuild命令现在会在构建完成后自动停止旧服务并启动新服务, 而不仅仅是编译镜像。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a539b33dff
commit
ace1e8673b
|
|
@ -1,4 +1,4 @@
|
|||
import { Controller, Get, Param, Query } from '@nestjs/common';
|
||||
import { Controller, Get, Param, Query, NotFoundException } from '@nestjs/common';
|
||||
import { ApiTags, ApiOperation, ApiResponse, ApiParam } from '@nestjs/swagger';
|
||||
import { GetContributionAccountQuery } from '../../application/queries/get-contribution-account.query';
|
||||
import { GetContributionStatsQuery } from '../../application/queries/get-contribution-stats.query';
|
||||
|
|
|
|||
|
|
@ -386,7 +386,19 @@ service_build() {
|
|||
service_rebuild() {
|
||||
local service="$1"
|
||||
local no_cache="$2"
|
||||
|
||||
# 1. Build the service
|
||||
service_build "$service" "$no_cache"
|
||||
|
||||
# 2. Stop the old service
|
||||
log_info "Stopping old $service..."
|
||||
service_stop "$service"
|
||||
|
||||
# 3. Start the new service
|
||||
log_info "Starting new $service..."
|
||||
service_start "$service"
|
||||
|
||||
log_success "$service rebuilt and restarted successfully"
|
||||
}
|
||||
|
||||
# ===========================================================================
|
||||
|
|
|
|||
Loading…
Reference in New Issue