deafgain-website/Dockerfile
2024-11-23 21:34:30 -06:00

23 lines
513 B
Docker

# Build stage
FROM --platform=linux/amd64 node:20-alpine as build
WORKDIR /app
# Essential build dependencies
RUN apk add --no-cache python3 make g++ curl git libc6-compat
# Install dependencies from package.json
COPY package*.json ./
RUN npm ci
RUN npm install -g typescript
# Build production assets
COPY . .
RUN npm run build
# Production stage
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]