feat: add install and domain scripts for erpnext
This commit is contained in:
@@ -18,28 +18,30 @@ fi
|
||||
|
||||
JWT_SECRET=$(openssl rand -hex 16 | cut -c-32)
|
||||
SIGNOZ_DIR="${APP_DIR}/signoz"
|
||||
JWT_SECRET_FILE="${SIGNOZ_DIR}/jwt-secret"
|
||||
|
||||
mkdir -p "${SIGNOZ_DIR}"
|
||||
|
||||
if [ -f "${JWT_SECRET_FILE}" ]; then
|
||||
JWT_SECRET=$(cat "${JWT_SECRET_FILE}")
|
||||
else
|
||||
echo "${JWT_SECRET}" > "${JWT_SECRET_FILE}"
|
||||
fi
|
||||
STATE_DIR="${SIGNOZ_DIR}/.excloud"
|
||||
COMPOSE_FILE="${SIGNOZ_DIR}/deploy/docker/docker-compose.yaml"
|
||||
OTEL_SERVICE_PATH='.services["otel-collector"].ports'
|
||||
SIGNOZ_SERVICE_PATH=".services.signoz.ports"
|
||||
|
||||
apt-get install -y caddy yq
|
||||
|
||||
if git -C ${SIGNOZ_DIR} rev-parse 2>/dev/null; then
|
||||
if git -C "${SIGNOZ_DIR}" rev-parse 2>/dev/null; then
|
||||
echo "Git repo exists"
|
||||
else
|
||||
git clone -b main https://github.com/SigNoz/signoz.git ${SIGNOZ_DIR}
|
||||
rm -rf "${SIGNOZ_DIR}"
|
||||
git clone -b main https://github.com/SigNoz/signoz.git "${SIGNOZ_DIR}"
|
||||
fi
|
||||
|
||||
cd ${SIGNOZ_DIR}/deploy/docker
|
||||
mkdir -p "${STATE_DIR}"
|
||||
JWT_SECRET_FILE="${STATE_DIR}/jwt-secret"
|
||||
|
||||
if [ -f "${JWT_SECRET_FILE}" ]; then
|
||||
JWT_SECRET=$(cat "${JWT_SECRET_FILE}")
|
||||
else
|
||||
echo "${JWT_SECRET}" > "${JWT_SECRET_FILE}"
|
||||
fi
|
||||
|
||||
cd "${SIGNOZ_DIR}/deploy/docker"
|
||||
|
||||
set_port() {
|
||||
local port_pair="$1"
|
||||
|
||||
Reference in New Issue
Block a user