Compare commits

...

5 Commits

Author SHA1 Message Date
wixxidevelop
aef3909faf
Merge 19ff2be8f2 into d958441d7f 2025-07-20 19:55:42 +03:00
RiverRay
d958441d7f
Merge pull request #6570 from zhang-zhonggui/main
Some checks failed
Run Tests / test (push) Has been cancelled
Add gemini-2.5-pro tag, you can use free gemini-2.5-pro
2025-07-17 11:30:34 +08:00
zzg
1600b96454
Update constant.ts
添加gemini-2.5-pro,可以免费使用Google Gemini
2025-07-17 08:07:15 +08:00
zzg
47047a60b2
Update constant.ts
添加免费的Gemini 2.5 Pro进行使用
2025-07-17 07:48:12 +08:00
wixxidevelop
19ff2be8f2
Update Dockerfile 2025-07-01 11:32:56 +01:00
2 changed files with 42 additions and 20 deletions

View File

@ -1,57 +1,79 @@
FROM node:18-alpine AS base
# Install dependencies only when needed
FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
# Copy package files
COPY package.json yarn.lock* ./
RUN yarn config set registry 'https://registry.npmmirror.com/'
RUN yarn install
# Configure yarn and install dependencies
RUN yarn config set registry 'https://registry.npmmirror.com/' && \
yarn install --frozen-lockfile
# Rebuild the source code only when needed
FROM base AS builder
RUN apk update && apk add --no-cache git
ENV OPENAI_API_KEY=""
ENV GOOGLE_API_KEY=""
ENV CODE=""
WORKDIR /app
# Copy node_modules from deps stage
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Set build-time environment variables
ENV NEXT_TELEMETRY_DISABLED 1
ENV NODE_ENV production
# Build the application
RUN yarn build
# Production image, copy all the files and run next
FROM base AS runner
WORKDIR /app
RUN apk add proxychains-ng
# Install proxychains for proxy support
RUN apk add --no-cache proxychains-ng
# Set runtime environment
ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
# Environment variables (will be overridden at runtime)
ENV PROXY_URL=""
ENV OPENAI_API_KEY=""
ENV GOOGLE_API_KEY=""
ENV CODE=""
ENV ENABLE_MCP=""
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/.next/server ./.next/server
# Create a non-root user
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs
RUN mkdir -p /app/app/mcp && chmod 777 /app/app/mcp
# Copy built application
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
# Create and set up MCP directory
RUN mkdir -p /app/app/mcp && \
chmod 777 /app/app/mcp
COPY --from=builder /app/app/mcp/mcp_config.default.json /app/app/mcp/mcp_config.json
# Switch to non-root user
USER nextjs
EXPOSE 3000
ENV PORT 3000
ENV HOSTNAME "0.0.0.0"
# Start the application
CMD if [ -n "$PROXY_URL" ]; then \
export HOSTNAME="0.0.0.0"; \
protocol=$(echo $PROXY_URL | cut -d: -f1); \
host=$(echo $PROXY_URL | cut -d/ -f3 | cut -d: -f1); \
port=$(echo $PROXY_URL | cut -d: -f3); \
conf=/etc/proxychains.conf; \
conf=/tmp/proxychains.conf; \
echo "strict_chain" > $conf; \
echo "proxy_dns" >> $conf; \
echo "remote_dns_subnet 224" >> $conf; \
@ -61,7 +83,6 @@ CMD if [ -n "$PROXY_URL" ]; then \
echo "localnet ::1/128" >> $conf; \
echo "[ProxyList]" >> $conf; \
echo "$protocol $host $port" >> $conf; \
cat /etc/proxychains.conf; \
proxychains -f $conf node server.js; \
else \
node server.js; \

View File

@ -555,6 +555,7 @@ const googleModels = [
"gemini-2.0-pro-exp",
"gemini-2.0-pro-exp-02-05",
"gemini-2.5-pro-preview-06-05",
"gemini-2.5-pro"
];
const anthropicModels = [