feat: use backend task.key, dev environment (dev.team.uix.su), env-only config
All checks were successful
Deploy Web Client / deploy (push) Successful in 36s
All checks were successful
Deploy Web Client / deploy (push) Successful in 36s
- Task key from backend (TE-1 format) - BFF config: all from env vars, no defaults for secrets - CORS: dev.team.uix.su added - STORAGE_ROOT for file storage - Build with NEXT_PUBLIC_API_URL=https://dev.team.uix.su
This commit is contained in:
parent
9ebddce01f
commit
32f9b26072
@ -23,7 +23,7 @@ app = FastAPI(title="Team Board BFF", version="0.2.0")
|
|||||||
|
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=["https://team.uix.su", "http://localhost:3100"],
|
allow_origins=["https://team.uix.su", "https://dev.team.uix.su", "http://localhost:3100"],
|
||||||
allow_methods=["*"],
|
allow_methods=["*"],
|
||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,19 +1,22 @@
|
|||||||
"""BFF configuration."""
|
"""BFF configuration — all from environment variables."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# Tracker (internal, not exposed to internet)
|
# Tracker (internal)
|
||||||
TRACKER_URL = os.getenv("TRACKER_URL", "http://localhost:8100")
|
TRACKER_URL = os.environ.get("TRACKER_URL", "http://localhost:8100")
|
||||||
TRACKER_WS_URL = os.getenv("TRACKER_WS_URL", "ws://localhost:8100/ws")
|
TRACKER_WS_URL = os.environ.get("TRACKER_WS_URL", "ws://localhost:8100/ws")
|
||||||
TRACKER_TOKEN = os.getenv("TRACKER_TOKEN", "tb-tracker-dev-token")
|
TRACKER_TOKEN = os.environ["TRACKER_TOKEN"] # required
|
||||||
|
|
||||||
# Auth
|
# Auth
|
||||||
JWT_SECRET = os.getenv("JWT_SECRET", "tb-jwt-Kx9mP4vQ7wZn2bR5")
|
JWT_SECRET = os.environ["JWT_SECRET"] # required
|
||||||
JWT_ALGORITHM = "HS256"
|
JWT_ALGORITHM = "HS256"
|
||||||
AUTH_USER = os.getenv("AUTH_USER", "admin")
|
AUTH_USER = os.environ.get("AUTH_USER", "admin")
|
||||||
AUTH_PASS = os.getenv("AUTH_PASS", "teamboard")
|
AUTH_PASS = os.environ["AUTH_PASS"] # required
|
||||||
|
|
||||||
# Server
|
# Server
|
||||||
HOST = os.getenv("BFF_HOST", "0.0.0.0")
|
HOST = os.environ.get("BFF_HOST", "0.0.0.0")
|
||||||
PORT = int(os.getenv("BFF_PORT", "8200"))
|
PORT = int(os.environ.get("BFF_PORT", "8200"))
|
||||||
ENV = os.getenv("BFF_ENV", "dev")
|
ENV = os.environ.get("BFF_ENV", "dev")
|
||||||
|
|
||||||
|
# File storage root (for project files)
|
||||||
|
STORAGE_ROOT = os.environ.get("STORAGE_ROOT", "/var/lib/team-board/files")
|
||||||
|
|||||||
@ -147,7 +147,7 @@ export default function TaskModal({ task, projectId, projectSlug, onClose, onUpd
|
|||||||
{title}
|
{title}
|
||||||
</h2>
|
</h2>
|
||||||
)}
|
)}
|
||||||
<div className="text-xs text-[var(--muted)] mt-1">{projectSlug.slice(0, 2).toUpperCase()}-{task.number}</div>
|
<div className="text-xs text-[var(--muted)] mt-1">{task.key}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-col md:flex-row">
|
<div className="flex flex-col md:flex-row">
|
||||||
|
|||||||
@ -79,6 +79,7 @@ export interface Task {
|
|||||||
project_id: string;
|
project_id: string;
|
||||||
parent_id: string | null;
|
parent_id: string | null;
|
||||||
number: number;
|
number: number;
|
||||||
|
key: string;
|
||||||
title: string;
|
title: string;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
type: string;
|
type: string;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user