mirror of
https://github.com/Ryujinx/Ryujinx-Ldn-Website.git
synced 2024-12-22 18:45:32 +00:00
d0ab84a254
* Switch to node package Setup environment for: - Typescript - express with ejs as the view engine * Apply prettier formatting * Read API stats from Redis * Apply prettier formatting * Add Dockerfile * Add environment variables for configuration to README.md * Log redis errors correctly * Connect to redis before executing requests * Rename json properties to match the current ones * Configure Redis error handler and client correctly * Remove workflow to fix pnpm dependencies GitHub supports pnpm for dependabot natively now: https://github.blog/changelog/2023-06-12-dependabot-version-updates-now-supports-pnpm/ * Add REDIS_SOCKET env var and prefer it over REDIS_URL * Add default.nix * Add SOCKET_PATH env var and prefer it over HOST and PORT * Bump website version * Add node symlink to output directory * Add DATA_PATH env var * Apply prettier formatting --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
27 lines
698 B
Docker
27 lines
698 B
Docker
FROM node:lts-hydrogen as common
|
|
|
|
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
|
|
ENV PATH=$PATH:/home/node/.npm-global/bin
|
|
|
|
RUN npm i -g pnpm
|
|
|
|
WORKDIR /home/node/app
|
|
|
|
FROM common as build
|
|
|
|
COPY . /home/node/app
|
|
|
|
RUN pnpm install --frozen-lockfile
|
|
RUN pnpm build
|
|
|
|
FROM common as app
|
|
|
|
COPY --from=build --chown=node:node /home/node/app/dist /home/node/app/dist
|
|
COPY --from=build --chown=node:node /home/node/app/public /home/node/app/public
|
|
COPY --from=build --chown=node:node /home/node/app/package.json /home/node/app/pnpm-lock.yaml /home/node/app/
|
|
COPY --from=build --chown=node:node /home/node/app/node_modules /home/node/app/node_modules
|
|
|
|
RUN mkdir /home/node/app/data
|
|
|
|
ENTRYPOINT [ "node", "." ]
|