feat: improve application access and money precision
This commit is contained in:
@@ -10,6 +10,8 @@ API_ENABLE_SEND_WORKER="${API_ENABLE_SEND_WORKER:-true}"
|
||||
API_SEND_WORKER_CONCURRENCY="${API_SEND_WORKER_CONCURRENCY:-50}"
|
||||
GATEWAY_CONTROL_ADDR="${GATEWAY_CONTROL_ADDR:-127.0.0.1:8090}"
|
||||
GATEWAY_CMPP_ADDR="${GATEWAY_CMPP_ADDR:-0.0.0.0:17890}"
|
||||
CMPP_PUBLIC_HOST="${CMPP_PUBLIC_HOST:-8.160.169.106}"
|
||||
CMPP_PUBLIC_PORT="${CMPP_PUBLIC_PORT:-${GATEWAY_CMPP_ADDR##*:}}"
|
||||
DB_NAME="${DB_NAME:-cmpp_platform}"
|
||||
DB_USER="${DB_USER:-cmpp}"
|
||||
DB_PASSWORD="${DB_PASSWORD:-$(openssl rand -hex 24 | tr -d '\n')}"
|
||||
@@ -199,6 +201,8 @@ OBJECT_STORAGE_LOCAL_ROOT=${OBJECT_STORAGE_LOCAL_ROOT}
|
||||
GATEWAY_CONTROL_URL=http://127.0.0.1:8090
|
||||
GATEWAY_HEALTH_ADDR=${GATEWAY_CONTROL_ADDR}
|
||||
GATEWAY_CMPP_ADDR=${GATEWAY_CMPP_ADDR}
|
||||
CMPP_PUBLIC_HOST=${CMPP_PUBLIC_HOST}
|
||||
CMPP_PUBLIC_PORT=${CMPP_PUBLIC_PORT}
|
||||
API_BASE_URL=http://127.0.0.1:${API_PORT}/api
|
||||
EOF
|
||||
chmod 600 /etc/cmpp-platform/cmpp-platform.env
|
||||
|
||||
@@ -29,6 +29,11 @@ if [[ ! "${API_SEND_WORKER_CONCURRENCY:-}" =~ ^[1-9][0-9]*$ ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "${CMPP_PUBLIC_HOST:-}" || ! "${CMPP_PUBLIC_PORT:-}" =~ ^[1-9][0-9]*$ ]]; then
|
||||
echo "CMPP_PUBLIC_HOST and a positive CMPP_PUBLIC_PORT are required in $ENV_FILE; these are the customer-facing CMPP endpoint." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$APP_DIR"
|
||||
|
||||
echo "[deploy] Installing dependencies"
|
||||
|
||||
Reference in New Issue
Block a user