Loading docker-celery-3.0.5/Makefile +8 −7 Original line number Diff line number Diff line Loading @@ -59,7 +59,10 @@ build: if [ -d "../external/csst-dag" ]; then echo " [OK] csst-dag"; else echo " [MISS] csst-dag"; fi; if [ -d "../external/csst-dags" ]; then echo " [OK] csst-dags"; else echo " [MISS] csst-dags"; fi; @if [ ! -f $(REQ_FILE) ]; then echo "Error: $(REQ_FILE) not found"; exit 1; fi @total=$$(grep -v '^#' $(REQ_FILE) | grep -v '^$$' | wc -l); \ @set -e; \ cleanup() { rm -rf ./api_gateway/csst-dfs-client ./api_gateway/ccds ./external/js9 >/dev/null 2>&1 || true; }; \ trap cleanup EXIT; \ total=$$(grep -v '^#' $(REQ_FILE) | grep -v '^$$' | wc -l); \ total_imgs=$$(($$total+$(CUSTOM_IMAGE_COUNT))); \ echo "Pulling, retagging and building all $${total_imgs} images..."; \ count=1; \ Loading @@ -71,10 +74,10 @@ build: echo "[$${count}/$${total_imgs}] Processing $${img} -> $${target} (Skipping pull, already exists)..."; \ else \ echo "[$${count}/$${total_imgs}] Processing $${img} -> $${target}..."; \ (docker pull $${img} > /dev/null 2>&1 || true); \ docker pull $${img} > /dev/null 2>&1; \ fi; \ if [ "$${img}" != "$${target}" ]; then \ (docker tag $${img} $${target} > /dev/null 2>&1 || true); \ docker tag $${img} $${target} > /dev/null 2>&1; \ fi; \ count=$$((count+1)); \ done; \ Loading @@ -90,8 +93,6 @@ build: rsync -a --delete --exclude ".git" --exclude "__pycache__" ../external/ccds/ ./api_gateway/ccds/; \ fi; \ docker build -q -t $(TARGET_API_GATEWAY) ./api_gateway; \ rm -rf ./api_gateway/csst-dfs-client; \ rm -rf ./api_gateway/ccds; \ echo "[$$(($$total+3))/$${total_imgs}] Building Task Portal Image ($(TARGET_TASK_PORTAL)) with BUILD_NUMBER=$(BUILD_NUMBER)..."; \ docker build -q --build-arg VITE_BUILD_NUMBER=$(BUILD_NUMBER) --build-arg VITE_BUILD_TIME="$(shell date '+%Y-%m-%d %H:%M:%S')" -t $(TARGET_TASK_PORTAL) ./frontend_vue; \ if [ "$(SKIP_JS9)" != "1" ]; then \ Loading @@ -101,13 +102,13 @@ build: rsync -a --delete --exclude ".git" --exclude "__pycache__" ../external/js9/ ./external/js9/; \ fi; \ docker build -q -t $(TARGET_JS9) -f ./js9_service/Dockerfile .; \ rm -rf ./external/js9; \ fi; \ echo "All $${total_imgs} images prepared successfully." push: @if [ -z "$(HARBOR_PROJECT)" ]; then echo "Error: HARBOR_PROJECT is empty. Please specify a registry prefix to push. Example: make push HARBOR_PROJECT=csu-harbor.csst.nao:10443/csst/"; exit 1; fi @total=$$(grep -v '^#' $(REQ_FILE) | grep -v '^$$' | wc -l); \ @set -e; \ total=$$(grep -v '^#' $(REQ_FILE) | grep -v '^$$' | wc -l); \ total_imgs=$$(($$total+$(CUSTOM_IMAGE_COUNT))); \ echo "Pushing all $${total_imgs} images to $(HARBOR_PROJECT)..."; \ count=1; \ Loading docker-celery-3.0.5/api_gateway/Dockerfile +8 −2 Original line number Diff line number Diff line Loading @@ -2,8 +2,15 @@ FROM python:3.11-slim WORKDIR /app COPY requirements.txt . ARG PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple ARG PIP_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn ARG PIP_DEFAULT_TIMEOUT=120 ARG PIP_RETRIES=5 ENV PIP_INDEX_URL=${PIP_INDEX_URL} ENV PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST} ENV PIP_DEFAULT_TIMEOUT=${PIP_DEFAULT_TIMEOUT} ENV PIP_RETRIES=${PIP_RETRIES} # Install dependencies, including local csst-dfs-client if it exists COPY csst-dfs-client /app/csst-dfs-client/ COPY ccds /app/ccds/ RUN pip install --no-cache-dir -r requirements.txt && \ Loading @@ -12,7 +19,6 @@ RUN if [ -f "/app/ccds/setup.py" ] || [ -f "/app/ccds/pyproject.toml" ]; then pi COPY . . # 暴露网关端口 EXPOSE 38000 CMD ["python", "-u", "main.py"] docker-celery-3.0.5/api_gateway/ccds/.keepdeleted 100644 → 0 +0 −1 Original line number Diff line number Diff line Loading
docker-celery-3.0.5/Makefile +8 −7 Original line number Diff line number Diff line Loading @@ -59,7 +59,10 @@ build: if [ -d "../external/csst-dag" ]; then echo " [OK] csst-dag"; else echo " [MISS] csst-dag"; fi; if [ -d "../external/csst-dags" ]; then echo " [OK] csst-dags"; else echo " [MISS] csst-dags"; fi; @if [ ! -f $(REQ_FILE) ]; then echo "Error: $(REQ_FILE) not found"; exit 1; fi @total=$$(grep -v '^#' $(REQ_FILE) | grep -v '^$$' | wc -l); \ @set -e; \ cleanup() { rm -rf ./api_gateway/csst-dfs-client ./api_gateway/ccds ./external/js9 >/dev/null 2>&1 || true; }; \ trap cleanup EXIT; \ total=$$(grep -v '^#' $(REQ_FILE) | grep -v '^$$' | wc -l); \ total_imgs=$$(($$total+$(CUSTOM_IMAGE_COUNT))); \ echo "Pulling, retagging and building all $${total_imgs} images..."; \ count=1; \ Loading @@ -71,10 +74,10 @@ build: echo "[$${count}/$${total_imgs}] Processing $${img} -> $${target} (Skipping pull, already exists)..."; \ else \ echo "[$${count}/$${total_imgs}] Processing $${img} -> $${target}..."; \ (docker pull $${img} > /dev/null 2>&1 || true); \ docker pull $${img} > /dev/null 2>&1; \ fi; \ if [ "$${img}" != "$${target}" ]; then \ (docker tag $${img} $${target} > /dev/null 2>&1 || true); \ docker tag $${img} $${target} > /dev/null 2>&1; \ fi; \ count=$$((count+1)); \ done; \ Loading @@ -90,8 +93,6 @@ build: rsync -a --delete --exclude ".git" --exclude "__pycache__" ../external/ccds/ ./api_gateway/ccds/; \ fi; \ docker build -q -t $(TARGET_API_GATEWAY) ./api_gateway; \ rm -rf ./api_gateway/csst-dfs-client; \ rm -rf ./api_gateway/ccds; \ echo "[$$(($$total+3))/$${total_imgs}] Building Task Portal Image ($(TARGET_TASK_PORTAL)) with BUILD_NUMBER=$(BUILD_NUMBER)..."; \ docker build -q --build-arg VITE_BUILD_NUMBER=$(BUILD_NUMBER) --build-arg VITE_BUILD_TIME="$(shell date '+%Y-%m-%d %H:%M:%S')" -t $(TARGET_TASK_PORTAL) ./frontend_vue; \ if [ "$(SKIP_JS9)" != "1" ]; then \ Loading @@ -101,13 +102,13 @@ build: rsync -a --delete --exclude ".git" --exclude "__pycache__" ../external/js9/ ./external/js9/; \ fi; \ docker build -q -t $(TARGET_JS9) -f ./js9_service/Dockerfile .; \ rm -rf ./external/js9; \ fi; \ echo "All $${total_imgs} images prepared successfully." push: @if [ -z "$(HARBOR_PROJECT)" ]; then echo "Error: HARBOR_PROJECT is empty. Please specify a registry prefix to push. Example: make push HARBOR_PROJECT=csu-harbor.csst.nao:10443/csst/"; exit 1; fi @total=$$(grep -v '^#' $(REQ_FILE) | grep -v '^$$' | wc -l); \ @set -e; \ total=$$(grep -v '^#' $(REQ_FILE) | grep -v '^$$' | wc -l); \ total_imgs=$$(($$total+$(CUSTOM_IMAGE_COUNT))); \ echo "Pushing all $${total_imgs} images to $(HARBOR_PROJECT)..."; \ count=1; \ Loading
docker-celery-3.0.5/api_gateway/Dockerfile +8 −2 Original line number Diff line number Diff line Loading @@ -2,8 +2,15 @@ FROM python:3.11-slim WORKDIR /app COPY requirements.txt . ARG PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple ARG PIP_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn ARG PIP_DEFAULT_TIMEOUT=120 ARG PIP_RETRIES=5 ENV PIP_INDEX_URL=${PIP_INDEX_URL} ENV PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST} ENV PIP_DEFAULT_TIMEOUT=${PIP_DEFAULT_TIMEOUT} ENV PIP_RETRIES=${PIP_RETRIES} # Install dependencies, including local csst-dfs-client if it exists COPY csst-dfs-client /app/csst-dfs-client/ COPY ccds /app/ccds/ RUN pip install --no-cache-dir -r requirements.txt && \ Loading @@ -12,7 +19,6 @@ RUN if [ -f "/app/ccds/setup.py" ] || [ -f "/app/ccds/pyproject.toml" ]; then pi COPY . . # 暴露网关端口 EXPOSE 38000 CMD ["python", "-u", "main.py"]
docker-celery-3.0.5/api_gateway/ccds/.keepdeleted 100644 → 0 +0 −1 Original line number Diff line number Diff line