``update Migrate from custom Node image to official Node 22 image, install pnpm, update Dockerfile and entrypoint script
``
This commit is contained in:
2
002_source/cms/.gitignore
vendored
2
002_source/cms/.gitignore
vendored
@@ -3,6 +3,8 @@
|
||||
**/*log
|
||||
**/*tmp
|
||||
|
||||
.pnpm-store
|
||||
|
||||
.env
|
||||
.env.production
|
||||
|
||||
|
@@ -1,5 +1,14 @@
|
||||
FROM 192.168.10.61:5000/nvm_ubuntu:latest
|
||||
# Use official Node 18 base image
|
||||
FROM node:22-slim
|
||||
|
||||
# Install pnpm globally
|
||||
RUN npm install -g pnpm
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
RUN nvm install 22
|
||||
# Copy your application code (optional, comment out if not needed)
|
||||
# COPY . .
|
||||
|
||||
# Default command (optional)
|
||||
CMD ["node"]
|
||||
|
@@ -3,12 +3,17 @@
|
||||
# set -x
|
||||
|
||||
# nvm use 20
|
||||
nvm install 18
|
||||
nvm alias default 18
|
||||
nvm use default
|
||||
node -v
|
||||
# pnpm run build
|
||||
|
||||
sleep infinity
|
||||
pnpm i
|
||||
|
||||
pnpm run build
|
||||
|
||||
while true; do
|
||||
pnpm run start
|
||||
|
||||
sleep 3
|
||||
done
|
||||
|
||||
# pnpm i -D
|
||||
|
||||
|
Reference in New Issue
Block a user