forked from Yara724/api
Compile NestJS on Parspack and deploy the commit-tagged image from the existing API directory.
27 lines
698 B
Docker
27 lines
698 B
Docker
# Use the official Node.js image as the base image
|
|
FROM docker.arvancloud.ir/node:20-alpine
|
|
|
|
RUN apk add --no-cache ffmpeg
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
|
|
RUN npm config set registry "https://repo.hmirror.ir/npm"
|
|
|
|
|
|
# Install the project dependencies
|
|
RUN npm i --force --verbose --no-scripts
|
|
|
|
# Copy the rest of the application code to the working directory
|
|
|
|
COPY . .
|
|
|
|
RUN npm run build && test -f dist/src/main.js
|
|
|
|
# Expose the port on which your NestJS application will run
|
|
EXPOSE 3002
|
|
|
|
# Start the NestJS application
|
|
CMD ["node", "dist/src/main.js"]
|