@@ -1,4 +1,4 @@
-FROM registry.cn-hangzhou.aliyuncs.com/stuuudy/python:3.11-slim AS base
+FROM docker.m.daocloud.io/library/python:3.11-slim AS base
WORKDIR /app
@@ -7,7 +7,6 @@ RUN pip install --no-cache-dir --upgrade pip setuptools wheel -i https://mirrors
&& pip install --no-cache-dir -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
COPY app ./app
-COPY .env ./.env
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
@@ -4,6 +4,8 @@ services:
context: .
dockerfile: Dockerfile
container_name: demand_server_backend
+ env_file:
+ - .env
ports:
- "8000:8000"
restart: unless-stopped
@@ -2,7 +2,9 @@ FROM node:20-alpine AS build
COPY package.json ./
-RUN npm install
+COPY package-lock.json ./
+RUN npm config set registry https://registry.npmmirror.com \
+ && npm ci --no-audit --no-fund
COPY . .
RUN npm run build