main
mula.liu 2025-12-23 13:43:01 +08:00
parent bc897706b3
commit 6c828b44d3
3 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
# 使用国内镜像加速
FROM python:3.9-slim
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.9-slim
# 设置工作目录
WORKDIR /app

View File

@ -3,7 +3,7 @@ version: '3.8'
services:
# MySQL 数据库
mysql:
image: mysql:8.0
image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/mysql:8.0
container_name: nex-docus-mysql
restart: unless-stopped
environment:
@ -29,7 +29,7 @@ services:
# Redis 缓存
redis:
image: redis:7-alpine
image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis:7-alpine
container_name: nex-docus-redis
restart: unless-stopped
command: redis-server --requirepass ${REDIS_PASSWORD:-redis_password_change_me} --appendonly yes

View File

@ -1,5 +1,5 @@
# 构建阶段
FROM node:18-alpine AS builder
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/node:18-alpine AS builder
# 设置工作目录
WORKDIR /app
@ -20,7 +20,7 @@ COPY . .
RUN npm run build
# 生产阶段
FROM nginx:alpine
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/nginx:alpine
# 复制构建产物到 nginx
COPY --from=builder /app/dist /usr/share/nginx/html