Compare commits
2 Commits
feat/inter
...
v2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
1203719eac
|
|||
|
373a71f04d
|
@@ -1,7 +1,7 @@
|
|||||||
FROM --platform=$BUILDPLATFORM python:3.10-alpine AS builder
|
FROM --platform=$BUILDPLATFORM python:3.13-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
RUN apk add git openssl curl
|
||||||
COPY requirements.txt /app
|
COPY requirements.txt /app
|
||||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
@@ -10,9 +10,8 @@ COPY . /app
|
|||||||
|
|
||||||
# Add mount point for data volume
|
# Add mount point for data volume
|
||||||
# VOLUME /data
|
# VOLUME /data
|
||||||
RUN apk add git openssl curl
|
|
||||||
|
|
||||||
ENTRYPOINT ["python3"]
|
ENTRYPOINT ["python3"]
|
||||||
CMD ["server.py"]
|
CMD ["server.py"]
|
||||||
|
|
||||||
FROM builder as dev-envs
|
FROM builder AS dev-envs
|
||||||
|
|||||||
10
account.py
10
account.py
@@ -1785,24 +1785,33 @@ def checkPreRequisites() -> dict[str, bool]:
|
|||||||
"hsd": False
|
"hsd": False
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try:
|
||||||
# Check if node is installed and get version
|
# Check if node is installed and get version
|
||||||
nodeSubprocess = subprocess.run(["node", "-v"], capture_output=True, text=True)
|
nodeSubprocess = subprocess.run(["node", "-v"], capture_output=True, text=True)
|
||||||
if nodeSubprocess.returncode == 0:
|
if nodeSubprocess.returncode == 0:
|
||||||
major_version = int(nodeSubprocess.stdout.strip().lstrip('v').split('.')[0])
|
major_version = int(nodeSubprocess.stdout.strip().lstrip('v').split('.')[0])
|
||||||
if major_version >= HSD_CONFIG.get("minNodeVersion", 20):
|
if major_version >= HSD_CONFIG.get("minNodeVersion", 20):
|
||||||
prerequisites["node"] = True
|
prerequisites["node"] = True
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
# Check if npm is installed
|
# Check if npm is installed
|
||||||
npmSubprocess = subprocess.run(["npm", "-v"], capture_output=True, text=True)
|
npmSubprocess = subprocess.run(["npm", "-v"], capture_output=True, text=True)
|
||||||
if npmSubprocess.returncode == 0:
|
if npmSubprocess.returncode == 0:
|
||||||
major_version = int(npmSubprocess.stdout.strip().split('.')[0])
|
major_version = int(npmSubprocess.stdout.strip().split('.')[0])
|
||||||
if major_version >= HSD_CONFIG.get("minNPMVersion", 8):
|
if major_version >= HSD_CONFIG.get("minNPMVersion", 8):
|
||||||
prerequisites["npm"] = True
|
prerequisites["npm"] = True
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
# Check if git is installed
|
# Check if git is installed
|
||||||
gitSubprocess = subprocess.run(["git", "-v"], capture_output=True, text=True)
|
gitSubprocess = subprocess.run(["git", "-v"], capture_output=True, text=True)
|
||||||
if gitSubprocess.returncode == 0:
|
if gitSubprocess.returncode == 0:
|
||||||
prerequisites["git"] = True
|
prerequisites["git"] = True
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
# Check if hsd is installed
|
# Check if hsd is installed
|
||||||
if os.path.exists("./hsd/bin/hsd"):
|
if os.path.exists("./hsd/bin/hsd"):
|
||||||
@@ -1958,7 +1967,6 @@ def hsdRestart():
|
|||||||
hsdStart()
|
hsdStart()
|
||||||
|
|
||||||
|
|
||||||
checkPreRequisites()
|
|
||||||
hsdInit()
|
hsdInit()
|
||||||
hsdStart()
|
hsdStart()
|
||||||
# endregion
|
# endregion
|
||||||
Reference in New Issue
Block a user