feat: new file

This commit is contained in:
Daniel
2026-04-12 17:56:12 +08:00
parent d7d892c845
commit a40e565867
6 changed files with 27 additions and 7 deletions

View File

@@ -1,3 +1,3 @@
QWEN_API_KEY=sk-85880595fc714d63bfd0b025e917bd26 QWEN_API_KEY=sk-85880595fc714d63bfd0b025e917bd26
QWEN_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v QWEN_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
QWEN_MODEL=qwen3.5-plus QWEN_MODEL=qwen3.5-plus

View File

@@ -1,4 +1,5 @@
FROM python:3.12-slim # 国内 Docker Hub 代理DaoCloudEOF/超时请换 docker.1ms.run/library 或配置 daemon registry-mirrors
FROM docker.m.daocloud.io/library/python:3.12-slim
WORKDIR /app WORKDIR /app

View File

@@ -1,6 +1,7 @@
# 基础镜像走国内 Docker Hub 代理DaoCloud稳定性较好若失败可改为 docker.1ms.run/library
services: services:
db: db:
image: postgres:16-alpine image: docker.m.daocloud.io/library/postgres:16-alpine
container_name: exam-helper-db container_name: exam-helper-db
restart: unless-stopped restart: unless-stopped
environment: environment:
@@ -33,7 +34,7 @@ services:
db: db:
condition: service_healthy condition: service_healthy
ports: ports:
- "8001:8000" - "8866:8000"
frontend: frontend:
build: build:
@@ -43,7 +44,7 @@ services:
depends_on: depends_on:
- backend - backend
ports: ports:
- "5173:80" - "8173:80"
volumes: volumes:
postgres_data: postgres_data:

View File

@@ -1,4 +1,4 @@
FROM node:22-alpine AS builder FROM docker.m.daocloud.io/library/node:22-alpine AS builder
WORKDIR /app WORKDIR /app
@@ -9,7 +9,7 @@ RUN npm config set registry https://registry.npmmirror.com && npm install
COPY . /app COPY . /app
RUN npm run build RUN npm run build
FROM nginx:1.27-alpine FROM docker.m.daocloud.io/library/nginx:1.27-alpine
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
COPY nginx.conf /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist /usr/share/nginx/html COPY --from=builder /app/dist /usr/share/nginx/html

0
m.json Normal file
View File

View File

@@ -20,6 +20,24 @@
└── docker-compose.yml └── docker-compose.yml
``` ```
## 国内镜像加速(部署)
- **容器基础镜像**:默认使用 `docker.m.daocloud.io/library/...`DaoCloud Docker Hub 代理)。若你所在网络下该源慢或失败,可将三处前缀统一改为 `docker.1ms.run/library``dockerproxy.cn/library`(后者偶发 EOF 时可换源)。
- **Python / npm / apk**:构建时已分别使用清华 PyPI、npmmirror、阿里云 Alpine 源(见各 `Dockerfile`)。
- **本机 Docker 守护进程(可选)**:仍从 Docker Hub 拉取其它镜像时,可在 Docker Desktop → Settings → Docker Engine 中配置 `registry-mirrors`,例如:
```json
{
"registry-mirrors": [
"https://docker.m.daocloud.io",
"https://docker.1ms.run",
"https://dockerproxy.cn"
]
}
```
保存并重启 Docker 后生效。
## 一键启动 ## 一键启动
确保本机已安装 Docker Desktop然后在项目根目录执行 确保本机已安装 Docker Desktop然后在项目根目录执行