First cut
This commit is contained in:
33
Dockerfile
Normal file
33
Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
FROM node:22-alpine AS base
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install deps
|
||||
COPY package.json package-lock.json* ./
|
||||
COPY shared/package.json shared/
|
||||
COPY server/package.json server/
|
||||
RUN npm install --ignore-scripts
|
||||
|
||||
# Copy source
|
||||
COPY . .
|
||||
|
||||
# Build
|
||||
RUN npm run build
|
||||
|
||||
# Production
|
||||
FROM node:22-alpine AS runtime
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=base /app/node_modules ./node_modules
|
||||
COPY --from=base /app/shared ./shared
|
||||
COPY --from=base /app/dist ./dist
|
||||
COPY --from=base /app/package.json ./
|
||||
COPY --from=base /app/site-context.json ./
|
||||
COPY --from=base /app/content ./content
|
||||
COPY --from=base /app/config ./config
|
||||
|
||||
ENV HOST=0.0.0.0
|
||||
ENV PORT=4321
|
||||
EXPOSE 4321
|
||||
|
||||
CMD ["node", "dist/server/entry.mjs"]
|
||||
Reference in New Issue
Block a user