ADD: added dockerfiles and a logger for the backend
This commit is contained in:
30
Dockerfile.frontend
Normal file
30
Dockerfile.frontend
Normal file
@@ -0,0 +1,30 @@
|
||||
# =========================
|
||||
# Build stage
|
||||
# =========================
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY frontend/studia/package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY frontend/studia/ ./
|
||||
RUN npm run build
|
||||
|
||||
|
||||
# =========================
|
||||
# Runtime stage
|
||||
# =========================
|
||||
FROM nginx:1.27-alpine
|
||||
|
||||
# Remove default nginx config
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Custom nginx config
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Vite build output
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user