@@ -59,6 +59,29 @@ push-user: ## Push the user image to the registry
|
||||
@echo "Successfully pushed user image."
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# Run Targets
|
||||
# ==============================================================================
|
||||
|
||||
.PHONY: ensure-version
|
||||
ensure-version:
|
||||
@if [ -z "${VERSION}" ] || [ "${VERSION}" = "null" ]; then \
|
||||
echo "ERROR: 未检测到版本号。请安装 jq 并在 panel-web/package.json 中设置有效的 version 字段。"; \
|
||||
echo "提示:可以运行 'make version' 查看当前版本值。"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
.PHONY: admin-run
|
||||
admin-run: ensure-version ## Run the admin container locally (binds to localhost:3000)
|
||||
@echo "Running admin container from image ${ADMIN_IMAGE}:${VERSION} on http://localhost:3000 ..."
|
||||
docker run --name ppanel-admin-web --rm -e NEXT_PUBLIC_API_URL=https://airoport.co -p 3000:3000 ${ADMIN_IMAGE}:${VERSION}
|
||||
|
||||
.PHONY: user-run
|
||||
user-run: ensure-version ## Run the user container locally (binds to localhost:3001)
|
||||
@echo "Running user container from image ${USER_IMAGE}:${VERSION} on http://localhost:3001 ..."
|
||||
docker run --name ppanel-user-web --rm -p 3001:3000 ${USER_IMAGE}:${VERSION}
|
||||
|
||||
|
||||
# ==============================================================================
|
||||
# Other Targets
|
||||
# ==============================================================================
|
||||
|
||||
Reference in New Issue
Block a user