admin firs step

This commit is contained in:
Roo
2026-03-23 21:43:40 +00:00
parent 309a72cc0b
commit cddcd34ba9
47 changed files with 22698 additions and 19 deletions

44
frontend/admin/Dockerfile Normal file
View File

@@ -0,0 +1,44 @@
# Multi-stage build for Nuxt 3 admin frontend
FROM node:20-slim as builder
WORKDIR /app
# Copy package files
COPY package*.json ./
COPY nuxt.config.ts ./
COPY tsconfig.json ./
# Install dependencies
RUN npm install --no-audit --progress=false
# Copy source code
COPY . .
# Build the application
RUN npm run build
# Production stage
FROM node:20-slim as runner
WORKDIR /app
# Create non-root user
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nuxtuser
# Copy built application and dependencies
COPY --from=builder --chown=nuxtuser:nodejs /app/.output ./
COPY --from=builder --chown=nuxtuser:nodejs /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
# Switch to non-root user
USER nuxtuser
# Expose port 3000 (Nuxt default)
EXPOSE 3000
# Start the application
ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=3000
CMD ["node", "./server/index.mjs"]