M
MCP Server Based Full Stack Solution
作者 @aksh9dyrs
MCP server by aksh9dyrs
创建于 8/20/2025
更新于 4 months ago
README
Repository documentation and setup instructions
Running the Project with Docker
This project is containerized using Docker and Docker Compose, with separate services for the Python backend (FastAPI), JavaScript frontend (served by Node.js/serve), and a PostgreSQL database. Below are the project-specific instructions and requirements for running the application.
Project-Specific Docker Requirements
-
Backend
- Python 3.11 (slim image)
- System dependencies:
gcc,libpq-dev,build-essential(forpsycopg2and other packages) - All Python dependencies are installed from
requirements.txtin a virtual environment - Runs as a non-root user (
appuser) - Exposes port 8000 (FastAPI)
-
Frontend
- Node.js 22.13.1 (alpine) for serving static files with the
servepackage - All static files (including
gallery/andproject images/folders) must be inside thefrontend/directory before building - Exposes port 80 (served by
serve)
- Node.js 22.13.1 (alpine) for serving static files with the
-
Database
- PostgreSQL (official image, version 15 recommended)
- Initializes schema from
./db/schema.sql(includes bothmanufacturing_eventsandmachines_infotables) - Exposes PostgreSQL port 5132 on the host (mapped to 5432 in the container)
- Uses a named volume
postgres-datafor persistent storage
Environment Variables
- PostgreSQL (set in
compose.yaml):POSTGRES_USER=postgresPOSTGRES_PASSWORD=postgresPOSTGRES_DB=postgres
- Backend: Uses the
DATABASE_URLenvironment variable, set automatically by Docker Compose for container-to-container communication. - Frontend: No required environment variables by default. If you need to add any, uncomment the
env_filelines in the compose file and provide a.envfile in the respective directory.
Build and Run Instructions
- Ensure Docker and Docker Compose are installed.
- From the project root, run:
This will build and start all services: backend, frontend, and database.docker compose up --build
Ports Exposed
- Backend (FastAPI): http://localhost:8000
- Frontend (Static): http://localhost (served on port 80)
- PostgreSQL: Host port 5132 (for local tools, containers use service name
postgres-db)
Static Assets (Images, etc.)
- Place all images and static assets (e.g.,
gallery/,project images/) inside thefrontend/directory before building the Docker image. - Reference images in your HTML/CSS/JS using paths like
/gallery/your-image.jpgor/project images/your-image.png. - The static server will serve these from the root, so
/gallery/...and/project images/...will work as expected.
Special Configuration
- The backend and frontend services are built from their respective directories using custom Dockerfiles.
- The backend uses a Python virtual environment for dependencies and runs as a non-root user.
- The frontend is served by Node.js using the
servepackage, not Nginx. - The database schema is automatically initialized from
./db/schema.sqlon first run (includes both main tables). - All services are connected via a custom Docker network (
app-network). - Persistent database storage is handled via the
postgres-dataDocker volume.
Note: If you need to provide environment variables to the backend or frontend, create a .env file in the respective directory and uncomment the env_file line in the compose file.
快速设置
此服务器的安装指南
安装命令 (包未发布)
git clone https://github.com/aksh9dyrs/MCP-Server-Based-Full-stack-Solution
手动安装: 请查看 README 获取详细的设置说明和所需的其他依赖项。
Cursor 配置 (mcp.json)
{
"mcpServers": {
"aksh9dyrs-mcp-server-based-full-stack-solution": {
"command": "git",
"args": [
"clone",
"https://github.com/aksh9dyrs/MCP-Server-Based-Full-stack-Solution"
]
}
}
}
作者服务器
其他服务器由 aksh9dyrs