forked from Yara724/api
Changed AI to new version
This commit is contained in:
+8
-13
@@ -1,27 +1,22 @@
|
||||
# Use the official Node.js image as the base image
|
||||
FROM node:20-alpine
|
||||
# Use the official Node.js image as the base image
|
||||
FROM docker.arvancloud.ir/node:20-alpine
|
||||
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json to the working directory
|
||||
COPY package*.json ./
|
||||
|
||||
# Iran access Repo
|
||||
RUN npm config set registry https://mirror-npm.runflare.com
|
||||
RUN npm config set registry "https://repo.hmirror.ir/npm"
|
||||
|
||||
|
||||
# Install the project dependencies
|
||||
RUN npm i --force
|
||||
RUN npm i --force --verbose --no-scripts
|
||||
|
||||
# Copy the rest of the application code to the working directory
|
||||
COPY . .
|
||||
|
||||
# Compile once at image build time — do not compile with `nest start` at container boot
|
||||
RUN npm run build
|
||||
COPY . .
|
||||
|
||||
# Expose the port on which your NestJS application will run
|
||||
EXPOSE 3002
|
||||
|
||||
# Run the prebuilt app (avoids TypeScript compile OOM on restart)
|
||||
ENV NODE_OPTIONS=--max-old-space-size=1024
|
||||
CMD ["npm", "run", "start:prod"]
|
||||
# Start the NestJS application
|
||||
CMD ["npm", "start"]
|
||||
Reference in New Issue
Block a user