All checks were successful
Build and Push Docker Image / docker (push) Successful in 14s
24 lines
556 B
Docker
24 lines
556 B
Docker
# Lightweight production image for the Hitstar Node app
|
|
FROM node:22-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY package*.json ./
|
|
# Use npm ci when a lockfile is present, otherwise fallback to npm install without throwing an error
|
|
RUN if [ -f package-lock.json ] || [ -f npm-shrinkwrap.json ]; then \
|
|
npm ci --omit=dev; \
|
|
else \
|
|
npm install --omit=dev; \
|
|
fi
|
|
|
|
# Copy app source (media lives outside via volume)
|
|
COPY . .
|
|
|
|
ENV NODE_ENV=production \
|
|
PORT=5173
|
|
|
|
EXPOSE 5173
|
|
|
|
CMD ["node", "src/server/index.js"]
|