fix: Docker python version and fix reporting missing requirements
All checks were successful
Build Docker / Build Image (push) Successful in 2m58s
All checks were successful
Build Docker / Build Image (push) Successful in 2m58s
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
FROM --platform=$BUILDPLATFORM python:3.10-alpine AS builder
|
||||
FROM --platform=$BUILDPLATFORM python:3.13-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add git openssl curl
|
||||
COPY requirements.txt /app
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
pip3 install -r requirements.txt
|
||||
@@ -10,9 +10,8 @@ COPY . /app
|
||||
|
||||
# Add mount point for data volume
|
||||
# VOLUME /data
|
||||
RUN apk add git openssl curl
|
||||
|
||||
ENTRYPOINT ["python3"]
|
||||
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
|
||||
}
|
||||
|
||||
try:
|
||||
# Check if node is installed and get version
|
||||
nodeSubprocess = subprocess.run(["node", "-v"], capture_output=True, text=True)
|
||||
if nodeSubprocess.returncode == 0:
|
||||
major_version = int(nodeSubprocess.stdout.strip().lstrip('v').split('.')[0])
|
||||
if major_version >= HSD_CONFIG.get("minNodeVersion", 20):
|
||||
prerequisites["node"] = True
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
try:
|
||||
# Check if npm is installed
|
||||
npmSubprocess = subprocess.run(["npm", "-v"], capture_output=True, text=True)
|
||||
if npmSubprocess.returncode == 0:
|
||||
major_version = int(npmSubprocess.stdout.strip().split('.')[0])
|
||||
if major_version >= HSD_CONFIG.get("minNPMVersion", 8):
|
||||
prerequisites["npm"] = True
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
try:
|
||||
# Check if git is installed
|
||||
gitSubprocess = subprocess.run(["git", "-v"], capture_output=True, text=True)
|
||||
if gitSubprocess.returncode == 0:
|
||||
prerequisites["git"] = True
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
# Check if hsd is installed
|
||||
if os.path.exists("./hsd/bin/hsd"):
|
||||
@@ -1958,7 +1967,6 @@ def hsdRestart():
|
||||
hsdStart()
|
||||
|
||||
|
||||
checkPreRequisites()
|
||||
hsdInit()
|
||||
hsdStart()
|
||||
# endregion
|
||||
Reference in New Issue
Block a user