更新了国内镜像
parent
c9b4109bdc
commit
5737eee2c3
|
|
@ -1,5 +1,5 @@
|
||||||
# Backend Dockerfile for Cosmo
|
# Backend Dockerfile for Cosmo
|
||||||
FROM python:3.12-slim
|
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/python:3.12-slim
|
||||||
|
|
||||||
# Set working directory
|
# Set working directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ version: '3.8'
|
||||||
services:
|
services:
|
||||||
# PostgreSQL Database
|
# PostgreSQL Database
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:15-alpine
|
image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/postgres:15-alpine
|
||||||
container_name: cosmo_postgres
|
container_name: cosmo_postgres
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -26,7 +26,7 @@ services:
|
||||||
|
|
||||||
# Redis Cache
|
# Redis Cache
|
||||||
redis:
|
redis:
|
||||||
image: redis:7-alpine
|
image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis:7-alpine
|
||||||
container_name: cosmo_redis
|
container_name: cosmo_redis
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: >
|
command: >
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# Frontend Dockerfile for Cosmo (Multi-stage build)
|
# Frontend Dockerfile for Cosmo (Multi-stage build)
|
||||||
|
|
||||||
# Stage 1: Build
|
# Stage 1: Build
|
||||||
FROM node:22-alpine AS builder
|
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/node:22-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
@ -22,7 +22,7 @@ ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Stage 2: Production with Nginx
|
# Stage 2: Production with Nginx
|
||||||
FROM nginx:1.25-alpine
|
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/nginx:1.25-alpine
|
||||||
|
|
||||||
# Copy built files from builder
|
# Copy built files from builder
|
||||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue