Mix Space + Shiro Blog Container Deployment Guide (No Reverse Proxy Version)
Organized and polished: Hermes
This document records the complete configuration for deploying Mix Space backend and Shiro frontend using Docker Compose. No Nginx reverse proxy configuration is required.
Project Overview
- Backend: Mix Space Core v10.1.5
- Frontend: Shiro (latest version)
- Database: MongoDB 7
- Cache: Redis
Service Architecture
┌─────────────────────────────────────────────────┐
│ Docker Network │
│ (mx-space) │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ MongoDB │ │ Redis │ │ Mix Space│ │
│ │ :27017 │ │ :6379 │ │ :2333 │ │
│ └──────────┘ └──────────┘ └────┬─────┘ │
│ │ │
│ ┌────────▼──────┐ │
│ │ Shiro │ │
│ │ :2323 │ │
│ └───────────────┘ │
└─────────────────────────────────────────────────┘docker-compose.yml
version: "3.8"
networks:
mx-space:
services:
# MongoDB —— Primary Data Storage
mongodb:
image: mongo:7
container_name: mx-mongo
restart: always
volumes:
- ./data/mongo:/data/db
networks:
- mx-space
environment:
MONGO_INITDB_DATABASE: mx-space
# Redis —— Cache and Session
redis:
image: redis:7-alpine
container_name: mx-redis
restart: always
volumes:
- ./data/redis:/data
networks:
- mx-space
# Mix Space Core —— Backend
mx-server:
image: mxspace/mx-server:10
container_name: mx-server
restart: always
ports:
- "2333:2333"
depends_on:
- mongodb
- redis
networks:
- mx-space
environment:
- NODE_ENV=production
- MONGO_URL=mongodb://mongodb:27017/mx-space
- REDIS_URL=redis://redis:6379
- JWT_SECRET=your_jwt_secret_here
- ALLOWED_ORIGINS=*
volumes:
- ./data/mx-space:/app/data
# Shiro —— Frontend
mx-web:
image: mxspace/shiro:latest
container_name: mx-shiro
restart: always
ports:
- "2323:2323"
depends_on:
- mx-server
networks:
- mx-space
environment:
- NEXT_PUBLIC_API_URL=http://localhost:2333/api/v2
- NEXTAUTH_URL=http://localhost:2323
- NEXTAUTH_SECRET=your_nextauth_secret_hereDeployment Steps
1. Create Project Directory
mkdir mx-space && cd mx-space
mkdir -p data/mongo data/redis data/mx-space2. Write docker-compose.yml
Save the above configuration as docker-compose.yml.
3. Modify Configuration
Modify the environment variables according to your actual situation:
JWT_SECRET: Replace with a random string (can be generated usingopenssl rand -hex 32)NEXTAUTH_SECRET: Same as aboveALLOWED_ORIGINS: In production, it is recommended to specify specific domains
4. Start Services
5. Verification
- Backend: Visit
http://Server_IP:2333/api/v2, it should return API information - Frontend: Visit
http://Server_IP:2323, you should see the blog frontend - Admin Panel: Visit
http://Server_IP:2323/qaqdminto enter the admin panel
Administrator Initialization
After the first startup, visiting the admin panel will prompt you to create an administrator account. Once completed, you can start writing articles.
Common Issues
404 Not Found
If the backend returns a 404 after starting, MongoDB might not be ready yet. Wait a moment and then restart mx-server:
Database Version Incompatibility
Mix Space v10.x must be used with MongoDB. If you previously used the PostgreSQL version, please ensure:
- Backend version is 10.x
- Database uses MongoDB instead of PostgreSQL
Invalid Origin Error
Add the access domain or IP address to ALLOWED_ORIGINS. During testing, you can directly set it to *.
Note:
127.0.0.1without the port number may not work; write the full address like127.0.0.1:2333
Last updated: 2026-06-24 | Organized and polished: Hermes