Files
hitstar/Dockerfile
Elmar Kresse a63c5858f7
All checks were successful
Build and Push Docker Image / docker (push) Successful in 8s
refactor: update CMD instruction in Dockerfile to specify host binding
2025-09-04 17:45:26 +02:00

24 lines
577 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", "--host", "0.0.0.0"]