Skip to content

Commit

Permalink
feat: update node version
Browse files Browse the repository at this point in the history
  • Loading branch information
fengkx committed Jan 6, 2025
1 parent 5effafa commit be205c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM node:18-alpine as ts-builder
FROM node:22-alpine as ts-builder
WORKDIR /app
COPY . /app
RUN npm i -g npm && npm ci --ignore-scripts && npm run build

FROM node:18-alpine as dep-builder
FROM node:22-alpine as dep-builder
WORKDIR /app
COPY package.json package-lock.json /app/
COPY tools /app/tools
RUN apk add --no-cache --update build-base python3
COPY --from=ts-builder /app/dist /app/dist
RUN npm i -g npm && npm ci && node tools/minify-docker.js && sh tools/clean-nm.sh

FROM node:18-alpine as app
FROM node:22-alpine as app
WORKDIR /app
ENV NODE_PRODUCTION true
COPY data /app/data
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Another Telegram RSSBot in Node.js",
"main": "dist/source",
"engines": {
"node": ">16.13",
"node": ">=18",
"npm": ">=7"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"outDir": "dist",
"target": "es2020", // Node.js 14
"target": "es2022", // Node.js 18
"module": "commonjs",
"moduleResolution": "node",
"resolveJsonModule": true,
Expand Down

0 comments on commit be205c5

Please sign in to comment.