mirror of
https://github.com/BreizhHardware/Jellystat.git
synced 2026-01-18 16:27:20 +01:00
26 lines
360 B
Docker
26 lines
360 B
Docker
# Stage 1: Build the application
|
|
FROM node:slim AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm cache clean --force
|
|
RUN npm install
|
|
|
|
COPY ./ ./
|
|
|
|
# Build the application
|
|
RUN npm run build
|
|
|
|
# Stage 2: Create the production image
|
|
FROM node:slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app .
|
|
COPY --chmod=755 entry.sh /entry.sh
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["/entry.sh"]
|