update build & default port

This commit is contained in:
SrGooglo 2025-02-11 16:44:21 +00:00
parent 1192b56700
commit 82c8c0af45
2 changed files with 15 additions and 7 deletions

View File

@ -1,9 +1,16 @@
FROM node:16-bullseye-slim FROM node:20-bookworm-slim
EXPOSE 5000
# Install dependencies
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt update RUN apt update
RUN apt install build-essential -y RUN apt install -y --no-install-recommends build-essential
RUN apt install python3 -y RUN apt install -y --no-install-recommends curl
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app RUN apt install -y --no-install-recommends ffmpeg
RUN apt install -y --no-install-recommends yarn
RUN apt install -y --no-install-recommends git
RUN apt install -y --no-install-recommends ssh
RUN apt install -y --no-install-recommends ca-certificates
WORKDIR /home/node/app WORKDIR /home/node/app
USER node USER node
@ -14,6 +21,7 @@ COPY --chown=node:node ./package.json .
COPY --chown=node:node ./src ./src COPY --chown=node:node ./src ./src
RUN chmod -R 777 /home/node/app RUN chmod -R 777 /home/node/app
RUN npm install -D --force RUN npm install
CMD ["node", "/home/node/app/src/index.js"] RUN export NODE_ENV=production
CMD ["npm", "run", "start"]

View File

@ -7,7 +7,7 @@ import fs from "node:fs"
class WebWrapper extends Server { class WebWrapper extends Server {
static disableBaseEndpoints = true static disableBaseEndpoints = true
static listenPort = process.env.HTTP_LISTEN_PORT || 9999 static listenPort = process.env.HTTP_LISTEN_PORT || 5000
static publicPath = path.resolve(process.cwd(), "public") static publicPath = path.resolve(process.cwd(), "public")
static cachePath = path.resolve(process.cwd(), ".cache") static cachePath = path.resolve(process.cwd(), ".cache")