Templates/order-db-seed

order-db-seed

Build Complete

订单查询 / 退款判断回归环境,预置订单库快照与退款规则配置。

Created At
2026-08-12 10:20:04
Updated At
2026-08-19 14:06:41
Usage
1,286 launches · View in Sandboxes
Current Version
v3 · Build Complete
该版本的默认值,Launch Sandbox 时可以逐项覆盖,不会改动 Template 本身。

Build Info

Started At
2026-08-19 13:58:12
Finished At
2026-08-19 14:06:41
Duration
8 分 29 秒
Image Size
1.84 GB

Runtime Info

Architecture
x86_64
Size
Medium · 2 CPU · 4 GB
Timeout
1 hour
Role
Standard

Dockerfile

Dockerfile
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai

RUN apt-get update && apt-get install -y \
    curl git ca-certificates postgresql-client \
    python3 python3-pip \
 && rm -rf /var/lib/apt/lists/*

WORKDIR /workspace

COPY requirements.txt /workspace/requirements.txt
RUN pip3 install --no-cache-dir -r /workspace/requirements.txt

ENV ORDER_DB_HOST=order-db.internal
ENV ORDER_DB_PORT=5432

CMD ["/bin/bash"]

Template Build Commands

构建阶段执行,结果写入镜像
psql -f /workspace/seed/orders_snapshot.sql
python3 /workspace/seed/build_refund_rules.py --out /opt/rules
python3 -m compileall /workspace
chmod -R 755 /opt/rules
无匹配
LineTimeStageLog Content