refactor: extract nginx to standalone nginx-gateway deployment
- Remove coze-web service from docker-compose.yml
- Replace nginx second stage in frontend/Dockerfile with alpine dist-only stage
- Add nginx-gateway/ with standalone nginx container deployment
- docker-compose.yml joining both coze-network and kong-net
- Split nginx configs into 6 per-domain files:
- 00-upstreams.conf (shared upstreams)
- 10-default-server.conf (catch-all 444)
- 20-coze.conf (coze studio)
- 30-kong-api.conf (kong ai gateway)
- 40-admin-portal.conf (admin portal)
- 50-grafana.conf (grafana dashboard)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+4
-16
@@ -36,19 +36,7 @@ RUN chmod +x scripts/hooks/post-rush-install.sh && rm -rf /app/common/temp && ru
|
||||
# Use rush build to build the specific project
|
||||
RUN rush build --to @coze-studio/app
|
||||
|
||||
# Production image stage
|
||||
FROM nginx:1.25-alpine
|
||||
|
||||
|
||||
# if you located in China, you can use aliyun mirror to speed up
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
# Install necessary tools for SSL configuration
|
||||
RUN apk add --no-cache bash
|
||||
|
||||
# Copy build artifacts to nginx static directory
|
||||
COPY --from=builder /app/frontend/apps/coze-studio/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 8888
|
||||
|
||||
# Start nginx
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
# Dist-only stage: 镜像仅用于提取构建产物,不运行任何服务
|
||||
FROM alpine:latest
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/frontend/apps/coze-studio/dist /app/dist
|
||||
|
||||
Reference in New Issue
Block a user