Files
triviathang/Dockerfile.frontend
2026-01-12 21:13:21 -05:00

23 lines
473 B
Docker

FROM node:20-slim
WORKDIR /app
# Copy package files from nested directory
COPY frontend/frontend/package*.json ./
# Install dependencies
RUN npm install
# Copy application code
COPY frontend/frontend ./
# Default port (can be overridden via environment variable)
ARG PORT=3000
ENV PORT=${PORT}
# Expose Vite dev server port
EXPOSE ${PORT}
# Run dev server with host 0.0.0.0 to allow access from outside container
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]