Files
bttoxin-pipeline/activate_backend.sh
zly 9835b6e341 feat(deploy): fix docker deployment and add backend i18n
- Docker Deployment Fixes:
  - Switch base images to docker.m.daocloud.io to resolve registry 401 errors
  - Add Postgres and Redis services to docker-compose.traefik.yml
  - Fix frontend build: replace missing icons (Globe->Location, Chart->TrendCharts)
  - Fix frontend build: resolve pnpm CI/TTY issues and frozen lockfile errors
  - Add missing backend dependencies (sqlalchemy, psycopg2, redis-py, celery, docker-py) in pixi.toml
  - Ensure database tables are created on startup (lifespan event)

- Backend Internationalization (i18n):
  - Add backend/app/core/i18n.py for locale handling
  - Update API endpoints (jobs, tasks, uploads, results) to return localized messages
  - Support 'Accept-Language' header (en/zh)

- Documentation:
  - Update DOCKER_DEPLOYMENT.md with new architecture and troubleshooting
  - Update AGENTS.md with latest stack details and deployment steps
  - Update @fix_plan.md status

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-14 12:38:54 +08:00

33 lines
1002 B
Bash

export PATH="/app/.pixi/envs/webbackend/bin:/root/.pixi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export CONDA_SHLVL=1
export CONDA_PREFIX=/app/.pixi/envs/webbackend
export PIXI_PROJECT_ROOT=/app
export PIXI_PROJECT_NAME=bttoxin-pipeline
export PIXI_PROJECT_MANIFEST=/app/pixi.toml
export PIXI_PROJECT_VERSION=0.1.0
export PIXI_IN_SHELL=1
export PIXI_EXE=/usr/local/bin/pixi
export CONDA_DEFAULT_ENV=bttoxin-pipeline:webbackend
export PIXI_ENVIRONMENT_NAME=webbackend
export PIXI_ENVIRONMENT_PLATFORMS=linux-64
export PIXI_PROMPT='(bttoxin-pipeline:webbackend) '
# shellcheck shell=bash
pixi() {
local first_arg="${1-}"
"${PIXI_EXE-}" "$@" || return $?
case "${first_arg-}" in
add | a | remove | rm | install | i)
eval "$("$PIXI_EXE" shell-hook --change-ps1 false)"
hash -r
;;
esac || :
return 0
}
export PS1="(bttoxin-pipeline:webbackend) ${PS1:-}"
exec uvicorn backend.app.main:app --reload --host 0.0.0.0 --port 8000 "$@"