mirror of
https://github.com/Dvorinka/Trackeep.git
synced 2026-06-04 04:22:57 +00:00
first test
This commit is contained in:
+9
-8
@@ -1,26 +1,27 @@
|
||||
# Build stage
|
||||
FROM node:18-alpine AS builder
|
||||
FROM node:22-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
RUN npm ci --only=production
|
||||
COPY frontend/package*.json ./frontend/
|
||||
RUN cd frontend && npm install --include=dev
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
# Copy environment variables and source code
|
||||
COPY .env ./frontend/
|
||||
COPY frontend/ ./frontend/
|
||||
|
||||
# Build the application
|
||||
RUN npm run build
|
||||
RUN cd frontend && npx vite build
|
||||
|
||||
# Production stage
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copy built assets from builder stage
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
COPY --from=builder /app/frontend/dist /usr/share/nginx/html
|
||||
|
||||
# Copy nginx configuration
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY frontend/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
Reference in New Issue
Block a user