elearning/frontend_management/Dockerfile
Missez e57630ac05
All checks were successful
Build and Deploy Frontend Learner / Build Frontend Learner Docker Image (push) Successful in 35s
Build and Deploy Frontend Management to Dev Server / Build Frontend Management Docker Image (push) Successful in 34s
Build and Deploy Frontend Learner / Deploy E-learning Frontend Learner to Dev Server (push) Successful in 3s
Build and Deploy Frontend Management to Dev Server / Deploy E-learning Frontend Management to Dev Server (push) Successful in 3s
Build and Deploy Frontend Learner / Notify Deployment Status (push) Successful in 1s
Build and Deploy Frontend Management to Dev Server / Notify Deployment Status (push) Successful in 2s
feat: add Dockerfile for frontend management and implement an admin page for user management.
2026-02-10 16:56:34 +07:00

47 lines
No EOL
919 B
Docker

# ================================
# Build Stage
# ================================
FROM node:20-alpine AS builder
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY . .
# Build the application
RUN npm run build
# ================================
# Production Stage
# ================================
FROM node:20-alpine AS production
# Set working directory
WORKDIR /app
# Set environment to production
ENV NODE_ENV=production
# Copy package files for preview command
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/.nuxt ./.nuxt
COPY --from=builder /app/.output ./.output
# Expose port
EXPOSE 3001
# Set default environment variables
ENV HOST=0.0.0.0
ENV PORT=3001
ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=3001
CMD ["node", ".output/server/index.mjs"]