mirror of
https://github.com/hexboy/maven-mirror-tool.git
synced 2026-07-09 17:28:25 +00:00
chore: update Dockerfile and package.json for Node 24 and Yarn 4.17.0; add ecosystem.config.cjs for PM2 management
This commit is contained in:
parent
c6d334bbe5
commit
c4ae2e1c7a
3 changed files with 13 additions and 12 deletions
|
|
@ -1,5 +1,5 @@
|
|||
ARG NODE_VERSION=22.6
|
||||
ARG ALPINE_VERSION=3.20
|
||||
ARG NODE_VERSION=24
|
||||
ARG ALPINE_VERSION=3.24
|
||||
|
||||
FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION}
|
||||
|
||||
|
|
@ -7,7 +7,7 @@ FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION}
|
|||
ENV NODE_ENV=production
|
||||
|
||||
# install and use yarn 4.x
|
||||
RUN corepack prepare yarn@4.3.1
|
||||
RUN corepack prepare yarn@4.17.0
|
||||
|
||||
# Run as a root user.
|
||||
USER root
|
||||
|
|
@ -32,4 +32,4 @@ RUN yarn workspaces focus --production && yarn cache clean
|
|||
EXPOSE 8008
|
||||
|
||||
# Run the application.
|
||||
ENTRYPOINT ["yarn", "run", "pm2", "start", "--attach", "--env", "${NODE_ENV}"]
|
||||
ENTRYPOINT ["yarn", "run", "pm2", "start", "ecosystem.config.cjs", "--attach", "--env", "$NODE_ENV"]
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ module.exports = {
|
|||
apps: [
|
||||
{
|
||||
name: 'mmt-server',
|
||||
script: 'node',
|
||||
args: 'src/index.ts',
|
||||
script: 'src/index.ts',
|
||||
interpreter: 'node',
|
||||
max_memory_restart: '300M',
|
||||
env: {
|
||||
env_production: {
|
||||
NODE_ENV: 'production',
|
||||
},
|
||||
env_development: {
|
||||
11
package.json
11
package.json
|
|
@ -11,11 +11,12 @@
|
|||
},
|
||||
"homepage": "https://github.com/hexboy/maven-mirror-tool",
|
||||
"scripts": {
|
||||
"dev": "node src/index.ts",
|
||||
"start": "pm2 start --attach",
|
||||
"logs": "pm2 logs",
|
||||
"monit": "pm2 monit",
|
||||
"stop": "pm2 delete mmt-server",
|
||||
"dev": "node --watch src/index.ts",
|
||||
"start": "node src/index.ts",
|
||||
"pm2:start": "pm2 start ecosystem.config.cjs --attach",
|
||||
"pm2:logs": "pm2 logs",
|
||||
"pm2:monit": "pm2 monit",
|
||||
"pm2:stop": "pm2 delete mmt-server",
|
||||
"lint": "eslint"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue