Frontend deployment
Build Docker Image
Prerequisites
Ensure your system has the following software installed:- Docker Engine 20.10+ or Docker Desktop
- Docker Buildx (for multi-platform builds)
Build Commands
Execute the following command in the frontend project root directory to build the Docker image:Key Build Parameters
| Parameter | Description | Default Value |
|---|---|---|
NEXT_PUBLIC_API_URL | Backend API server address | None (required) |
NEXT_PUBLIC_FRONTEND_URL | Frontend application access address | None (required) |
NEXT_PUBLIC_API_DOCS_URL | Documentation address | None (required) |
Run Containers
Basic Run
Environment Variables Configuration
Production Environment Variables
In CI/CD pipelines, the following environment variables are configured through GitHub Actions secrets and variables:| Variable | Description | Configuration Location |
|---|---|---|
NEXT_PUBLIC_API_URL | Backend API address | GitHub Variables |
NEXT_PUBLIC_FRONTEND_URL | Frontend access address | GitHub Variables |
NEXT_PUBLIC_API_DOCS_URL | Documentation address | GitHub Variables |
Backend Deployment
Build Docker Image
Prerequisites
Ensure your system has the following software installed:- Docker Engine 20.10+ or Docker Desktop
- Docker Buildx (for multi-platform builds)
Build Commands
Execute the following command in the frontend project root directory to build the Docker image:Run Containers
Basic Run
Environment Variables Configuration
Required Environment Variables
| Variable | Type | Description |
|---|---|---|
PORT | number | Server port (default: 5000) |
FRONTEND_URL | string | CORS allowed origins (JSON array serialized, e.g., "[\"http://localhost:3000\"]") |
BETTER_AUTH_SECRET | string | Better Auth secret key |
MONGODB_URI | string | MongoDB connection string |
AWS_ACCESS_KEY_ID | string | Volcano Engine TOS access key |
AWS_SECRET_ACCESS_KEY | string | Volcano Engine TOS secret key |
AWS_ENDPOINT | string | TOS service endpoint |
AWS_BUCKET | string | Storage bucket name |