KMES Usage Scenario Workflow
Business Scenario
This guide demonstrates the installation, deployment and use of the EMS system in a steel-manufacturing context.
Prerequisites
Ensure your local workstation has the following software installed:
- Docker
- Visual Studio Code (with the Python extension recommended)
- Node.js (version 20 or above)
- Python 3.12.5 (note: avoid Python 3.12.6 or newer as per the README)
- DBeaver (or an equivalent database client)
Proceed to prepare your environment according to the steps in README.md:
- Download Docker images
Usedocker-composeordocker pull/docker tagto obtain thepostgres:16andredis:latestimages:sh# Example (refer to README.md for exact commands) # docker-compose -f mes-compose.yml -p kmes up -d - Copy the environment-variable template:sh
cp .env.template dev.env- You may adjust any variables in
dev.envas required.
- You may adjust any variables in
- Start services (PostgreSQL & Redis):sh
docker-compose -f mes-compose.yml -p easy up -d # Or follow alternative startup methods as described in the README- Once started, verify the containers are running and connect to PostgreSQL via DBeaver.
Starting System Services
- Install backend dependencies:
- make sure
pipis latest version:pip install --upgrade pip - Install project dependencies:sh
pip install -e . # Or, for faster installs via the Aliyun mirror: # pip install -e . -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
- make sure
- Initialise the database:
- In VS Code, select Python 3.12.5 as the interpreter.
- Open the Debug view.
- run the
Server Cli - init-testconfiguration。
- Run the backend Services:
- In VS Code’s Debug view
- run the
Web API Server - 8000configuration.The API will start on port 8000.
- Install front-end dependencies:sh
npm install # or # yarn install - Run the front-end Service:sh
npm run dev - Access the system:
- Open your browser to
http://localhost:8881(or your configured address).
- Open your browser to