voxblog/docker/admin.Dockerfile
Ender 5ec4438bce docs: add comprehensive database and testing documentation
- Created DATABASE_SETUP.md with detailed MySQL setup, troubleshooting, and maintenance guides
- Added QUICK_TEST_GUIDE.md with step-by-step testing procedures for mobile responsiveness, image uploads, content statistics, and full workflow
- Included troubleshooting sections in both guides with common issues and solutions
- Added environment variable documentation and database schema details
- Documented backup/restore procedures and verification steps for
2025-10-26 23:21:34 +01:00

43 lines
894 B
Docker

FROM node:20-alpine AS builder
WORKDIR /app
# Build args
ARG VITE_API_URL=
ARG PNPM_FLAGS=--frozen-lockfile
# Copy workspace files
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY apps/admin/package.json ./apps/admin/
# Install pnpm
RUN npm install -g pnpm
# Install dependencies
RUN pnpm install ${PNPM_FLAGS}
# Copy source
COPY apps/admin ./apps/admin
# Build with environment variable
WORKDIR /app/apps/admin
ENV VITE_API_URL=$VITE_API_URL
RUN pnpm run build
# Production image with nginx
FROM nginx:alpine
# Copy built files
COPY --from=builder /app/apps/admin/dist /usr/share/nginx/html
# Copy nginx config
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1/ || exit 1
CMD ["nginx", "-g", "daemon off;"]