# SAAS-CLI **Repository Path**: TonyDon/saas-cli ## Basic Information - **Project Name**: SAAS-CLI - **Description**: 基础SAAS模板 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-03-01 - **Last Updated**: 2026-01-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Initialize ## Development Mode ### command line 1. set configure see docker mode set configure. 2. shell ``` cd make sh local-dev-conf.sh ``` ### custom 1. create configure directory. ``` mkdir config config/regist_conf ``` 2. copy configure file. ``` cp make/cfg-example.ini config/cfg-development.ini cp make/inspection.json config/inspection.json ``` 3. set config. ``` config/cfg-development.ini config/inspection.json ``` ## Docker Mode ### Env 1. SERVICE_PORT , service listen port, default 80. 2. PRODUCTION , service run mode. true is production, false is development ### Set Configure 1. /make/docker_init.ini ``` [development] RPC_SERVICE= http://192.168.0.106:10001 DB_NAME= dev_service_rpc MYSQL_DB_HOST= 192.168.0.110 MONGO_DB_HOST= 192.168.0.110 SERVICE_HOST= 192.168.0.110 [production] RPC_SERVICE= http://192.168.0.106:10001 DB_NAME= saas_service_rpc MYSQL_DB_HOST= 192.168.0.110 MONGO_DB_HOST= 192.168.0.110 SERVICE_HOST= 192.168.0.110 ``` 2. /make/cfg-example.ini set {service_name} set key set description ``` ;service config [SERVICE] host={service_host}:{service_port} name={service_name} ;e.g description= 'any string.' description='set mirco service description.' ;e.g key= rpc key='set mirco service key.' secret=d74218cff240f446d341c4a2f3a8c588 protocol=http:// ;rpc config [RPC] uri={rpc_service} token=d74218cff240f446d341c4a2f3a8c588 ;SERVICE KEY CONFIG [SERVICE_KEY] event= EVENT_CENTER api_router= API_ROUTER_CENTER permission= PERMISSION_CENTER config= REMOTE_CONFIG user_center= USER_CENTER general= GENERAL_SERVICE app_store= APP_STORE [LOAD_SERVICE] ; e.g services= REMOTE_CONFIG EVENT_CENTER services= '' ;db config [DB] host={mysql_host} port=3306 name={service_db_name} user=root password=123456 engine=django.db.backends.mysql ;default config [DEFAULT] language=zh-hans timeZone=Asia/Shanghai allowedHosts=* debug={debug} coding=utf-8 ;token expire time, seconds. expire_time=1200 ;cache config [CACHE] engine= mongo host= mongodb://{mongodb_host}:27017 db= saas_cache user= '' passwd= '' ; inspection configure [INSPECTION] path= config/inspection.json ``` 3. /make/inspection.json startup inspect ``` Example: [ { "name": "RPC", "uri": "http://{domian}/api/sniffer", "header": {} } ] ```