Fix Docker configuration for deployment
- Update backend Dockerfile to use Rust 1.85 (edition 2024 support) - Add Aliyun mirrors for Alpine packages - Add rsproxy.cn mirror for cargo crates - Enable static OpenSSL linking - Fix frontend Dockerfile to use NEXT_PUBLIC_API_BASE - Add mkdir -p public to ensure public dir exists - Update docker-compose files to use correct env var names - Add docker-compose.deploy.yml for production deployment Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -44,14 +44,14 @@ services:
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
# 构建时注入 API URL(用于 Next.js 静态优化)
|
||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-}
|
||||
NEXT_PUBLIC_API_BASE: ${NEXT_PUBLIC_API_BASE:-}
|
||||
container_name: notify-frontend
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- backend
|
||||
environment:
|
||||
# 运行时 API URL(用于 SSR)
|
||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-}
|
||||
NEXT_PUBLIC_API_BASE: ${NEXT_PUBLIC_API_BASE:-}
|
||||
ports:
|
||||
- "127.0.0.1:3000:3000"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user