Files
archived-gitea-ai-assistant/docker-compose.e2e.yml
jeffusion 5bb1c3a2d1 fix(frontend): standardize favicon/title, 401 redirect, SPA root route, and theme switching
- Replace default Vite favicon and title with project-specific branding
- Add axios response interceptor to handle 401 by clearing token and redirecting to login
- Move health check endpoint from '/' to '/api/health' so SPA index.html is served on root
- Integrate next-themes ThemeProvider with system preference detection and manual toggle
- Update docker-compose and k8s health check paths accordingly
- Replace hardcoded dark-only colors with semantic CSS variable tokens for theme compatibility
2026-03-24 12:30:13 +08:00

69 lines
1.7 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
version: '3.8'
# E2E 测试环境Gitea + gitea-assistant
# 用法:
# docker compose -f docker-compose.e2e.yml up -d
# # 等待服务启动后运行 seed 脚本:
# ./e2e/seed.sh
# # 运行 E2E 测试:
# ./e2e/test.sh
# # 清理:
# docker compose -f docker-compose.e2e.yml down -v
services:
gitea:
image: gitea/gitea:1.22
container_name: e2e-gitea
environment:
- GITEA__database__DB_TYPE=sqlite3
- GITEA__server__ROOT_URL=http://gitea:3000
- GITEA__server__HTTP_PORT=3000
- GITEA__security__INSTALL_LOCK=true
- GITEA__service__DISABLE_REGISTRATION=false
- GITEA__service__REQUIRE_SIGNIN_VIEW=false
- GITEA__webhook__ALLOWED_HOST_LIST=*
- GITEA__webhook__SKIP_TLS_VERIFY=true
ports:
- "3333:3000"
volumes:
- gitea-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/v1/version"]
interval: 5s
timeout: 3s
retries: 20
start_period: 10s
assistant:
build:
context: .
dockerfile: e2e/Dockerfile.e2e
container_name: e2e-assistant
depends_on:
gitea:
condition: service_healthy
environment:
- NODE_ENV=production
- GITEA_API_URL=http://gitea:3000/api/v1
- GITEA_ACCESS_TOKEN=${E2E_GITEA_TOKEN:-placeholder}
- PORT=3000
ports:
- "3334:3000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
ports:
- "3334:3000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
volumes:
gitea-data: