Files
wetter_station/frontend/Dockerfile
rxf 0b9d21c24c V1.1.0 Responsive
Footer angepasst
Lauffähigkeit auf Server verbessert
deploy.sh mit for loop
2026-03-22 18:44:22 +01:00

40 lines
648 B
Docker

# syntax=docker/dockerfile:1
# Build stage
FROM --platform=$BUILDPLATFORM node:20-alpine AS builder
# Build arguments
ARG BUILD_DATE=unknown
ARG VERSION=unknown
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY . .
# Build app with build info
ENV VITE_BUILD_DATE=${BUILD_DATE}
ENV VITE_VERSION=${VERSION}
RUN npm run build
# Production stage
FROM nginx:alpine
WORKDIR /usr/share/nginx/html
# Copy built app from builder
COPY --from=builder /app/dist .
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]