Dockerfile 삭제 및 .gitignore에 build 디렉토리 추가
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
build
|
37
Dockerfile
37
Dockerfile
@ -1,37 +0,0 @@
|
||||
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
|
||||
# Use an official Node.js image as the base image
|
||||
FROM node:16-alpine AS builder
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json files
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install --ignore-scripts
|
||||
|
||||
# Copy the rest of the application code
|
||||
COPY . .
|
||||
|
||||
# Build the application
|
||||
RUN npm run build
|
||||
|
||||
# Use a smaller image for the runtime
|
||||
FROM node:16-alpine AS runner
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the build output and package.json
|
||||
COPY --from=builder /app/build ./build
|
||||
COPY --from=builder /app/package.json ./
|
||||
|
||||
# Set environment variables
|
||||
ENV GITLAB_API_URL=https://gitlab.com/api/v4
|
||||
|
||||
# Define the command to run the application
|
||||
ENTRYPOINT ["node", "build/index.js"]
|
||||
|
||||
# This image requires the following environment variable at runtime:
|
||||
# - GITLAB_PERSONAL_ACCESS_TOKEN: Your GitLab personal access token
|
Reference in New Issue
Block a user