Add customer service API deployment support
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -5,7 +5,8 @@ FROM node:22-bookworm-slim AS admin-web-build
|
||||
WORKDIR /build/admin-web
|
||||
|
||||
COPY admin-web/package.json admin-web/package-lock.json ./
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci
|
||||
RUN --mount=type=cache,target=/root/.npm \
|
||||
npm ci
|
||||
|
||||
COPY admin-web/ ./
|
||||
RUN npm run build
|
||||
@@ -19,12 +20,22 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update \
|
||||
ARG APT_MIRROR=https://mirrors.aliyun.com/debian
|
||||
ARG APT_SECURITY_MIRROR=https://mirrors.aliyun.com/debian-security
|
||||
ARG PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
||||
RUN set -eux; \
|
||||
if [ -f /etc/apt/sources.list.d/debian.sources ]; then \
|
||||
sed -i "s|http://deb.debian.org/debian-security|${APT_SECURITY_MIRROR}|g; s|http://deb.debian.org/debian|${APT_MIRROR}|g" /etc/apt/sources.list.d/debian.sources; \
|
||||
elif [ -f /etc/apt/sources.list ]; then \
|
||||
sed -i "s|http://deb.debian.org/debian-security|${APT_SECURITY_MIRROR}|g; s|http://deb.debian.org/debian|${APT_MIRROR}|g" /etc/apt/sources.list; \
|
||||
fi; \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends libpq5 curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
RUN pip install --no-cache-dir -i "${PIP_INDEX_URL}" -r requirements.txt
|
||||
|
||||
COPY app ./app
|
||||
COPY schema搭建 ./schema搭建
|
||||
|
||||
Reference in New Issue
Block a user