This article records the complete configuration for deploying Mix Space backend and Shiro frontend using Docker Compose.
Visitor IP Information Card
Project Overview
- Backend: Mix Space Core v10.1.5
- Frontend: Shiro (latest)
- Database: MongoDB 7
- Cache: Redis
Service Architecture
CodeBlock Loading...
Configuration Files
docker-compose.yml
CodeBlock Loading...
.env
NEXT_PUBLIC_API_URL=http://192.168.1.100:2333/api/v2
NEXT_PUBLIC_GATEWAY_URL=http://192.168.1.100:2333
TMDB_API_KEY=
GH_TOKEN=Service Description
| Service | Container Name | Image | Port | Description |
|---|---|---|---|---|
| mx-server | mx-server | innei/mx-server:10.1.5 | 2333 | Backend API Service |
| shiro | shiro | innei/shiro:latest | 2323 | Frontend Blog Page |
| mongo | mongo | mongo:7 | 27017 | Database |
| redis | redis | redis:alpine | 6379 | Cache Service |
Environment Variable Description
Backend Environment Variables
| Variable Name | Description | Example Value |
|---|---|---|
DB_HOST | MongoDB Host Address | mongo |
REDIS_HOST | Redis Host Address | redis |
ALLOWED_ORIGINS | Allowed CORS Origins | * |
JWT_SECRET | JWT Secret Key | Random String |
BETTER_AUTH_URL | Authentication Service URL | http://192.168.1.100:2333 |
Frontend Environment Variables
| Variable Name | Description | Example Value |
|---|---|---|
NEXT_PUBLIC_API_URL | API Address (Browser Access) | http://192.168.1.100:2333/api/v2 |
NEXT_PUBLIC_GATEWAY_URL | Gateway Address | http://192.168.1.100:2333 |
NEXT_PUBLIC_CLIENT_API_URL | API Address (Server-side Access) | http://192.168.1.100:2333/api/v2 |
Deployment Commands
CodeBlock Loading...
Access Addresses
- Blog Homepage: http://192.168.1.100:2323
- Backend API: http://192.168.1.100:2333/api/v2
- Admin Panel: http://192.168.1.100:2333/proxy/qaqdmin
Notes
- Version Compatibility: Shiro frontend is only compatible with Mix Space Core 10.x versions, not 11.x/12.x
- Database: Version 10.x uses MongoDB, while 11.x/12.x versions use PostgreSQL
- Environment Variables: The frontend needs to configure both
NEXT_PUBLIC_API_URLandNEXT_PUBLIC_CLIENT_API_URL - CORS Configuration:
ALLOWED_ORIGINSneeds to include all access origins - IP: Change
192.168.1.100to your IP or revert to 127.0.0.1. When modifying, note that theBETTER_AUTH_URLenvironment variable needs to be changed to your backend address + port
Common Issues
TypeError: Cannot read properties of undefined (reading 'config')
This error is caused by version incompatibility. Please ensure:
- Backend version is 10.x
- Database uses MongoDB instead of PostgreSQL
Invalid origin error
--- You need to add the accessed domain name or IP address in ALLOWED_ORIGINS. During testing, it is recommended to directly use * to allow all. Also, the port number is required; 127.0.0.1 alone will not work, use 127.0.0.1:2333.
Last updated: 2026-05-09