Local Development Environment¶
This page describes how to set up a local development environment for OpsAnt.
Frontend¶
The frontend development server proxies the backend API by default, so the backend must already be running locally (or remotely).
Backend¶
The backend is based on Django and requires Python 3.12 and dependencies:
# 创建虚拟环境
python3.12 -m venv venv
source venv/bin/activate
# 安装依赖(国内环境建议用阿里云镜像)
pip install --index-url https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt
Note: The MySQL driver uses
pymysql(in settings,pymysql.install_as_MySQLdb()), because mysqlclient has no arm64 wheel.
Start the Backend¶
Database¶
For local development, you can connect to the MySQL / Redis of the test environment, or set up a local instance yourself.
Multi-language¶
- Frontend multi-language is in
frontend/src/locales/ - New text needs to be synchronized across 7 language files
- For documentation multi-language, see Documentation Translation