单容器重构

This commit is contained in:
2025-12-12 22:36:25 +08:00
parent 31de3a94a6
commit 62cb6d18b0
14 changed files with 767 additions and 261 deletions

View File

@@ -1,22 +0,0 @@
# Dockerfile with China mirrors for faster builds
# Usage: docker build -f Dockerfile.china -t qquiz-frontend .
FROM node:18-alpine
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies using Taobao npm registry
RUN npm config set registry https://registry.npmmirror.com && \
npm install
# Copy application code
COPY . .
# Expose port
EXPOSE 3000
# Start development server
CMD ["npm", "start"]

View File

@@ -6,7 +6,7 @@ import toast from 'react-hot-toast'
// Create axios instance
const api = axios.create({
baseURL: import.meta.env.VITE_API_URL || 'http://localhost:8000',
baseURL: import.meta.env.VITE_API_URL || '/api',
timeout: 30000,
headers: {
'Content-Type': 'application/json'