python -m venv venv
Ta̍k-kái攏ài開,才來開發。
source venv/bin/activate
tox是tī本機走test用--ê。
pip install tox
依需求執行,如:
tox -e yamllint
tox -e flake8
詳細需求可參考tox.ini
。
requirements.in
是記專案有直接用ê第三方套件。requirements.txt
是管kui專案全部第三方套件koh對應版本,保證開發、CI試驗、上線版本一致。
-
請先
pip install pip-tools
tàu pip-tools 自動管理套件版本。 -
手動更新
requirements.in
。 -
揀一款指令自動更新套件版本。
# 有必要--ê才更新 pip-compile pip-compile asr/requirements.in # 盡量更新 pip-compile --upgrade pip-compile asr/requirements.in
-
檢查
requirements.txt
更新狀態。
- 設定reverse proxy server:
git clone --depth 1 https://github.com/i3thuan5/ZuGi.git
docker compose -f ZuGi/docker-compose.yml up -d --build nginx-proxy
-
準備環境變數檔:
cp deploy/.env.template .env
,並把要測試的服務HOST改成localhost
。 -
編image後啟動:
docker compose up -d --build
。