mirror of
https://github.com/YuzuZensai/Minikura.git
synced 2026-03-30 16:27:24 +00:00
✨ feat: k8s operator
This commit is contained in:
32
packages/k8s-operator/Dockerfile
Normal file
32
packages/k8s-operator/Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
FROM node:18-alpine AS build
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package.json ./
|
||||
COPY tsconfig.json ./
|
||||
|
||||
# Copy source files
|
||||
COPY src/ ./src/
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
# Build
|
||||
RUN npm run build
|
||||
|
||||
# Create production image
|
||||
FROM node:18-alpine
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package.json and built files
|
||||
COPY --from=build /app/package.json ./
|
||||
COPY --from=build /app/dist ./dist
|
||||
|
||||
# Install production dependencies
|
||||
RUN npm install --production
|
||||
|
||||
# Set environment variables
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Run
|
||||
CMD ["node", "dist/index.js"]
|
||||
Reference in New Issue
Block a user