initial commit

This commit is contained in:
HPL-JesusCastro
2026-05-23 00:46:01 +08:00
commit ae2d6fa158
31 changed files with 8699 additions and 0 deletions

38
Dockerfile Normal file
View File

@@ -0,0 +1,38 @@
# Stage 1: Build frontend
FROM node:22-alpine AS build-frontend
WORKDIR /app/frontend
COPY frontend/package*.json ./
RUN npm install
COPY frontend/ ./
RUN npm run build
# Stage 2: Build backend
FROM node:22-alpine AS build-backend
WORKDIR /app/backend
COPY backend/package*.json ./
RUN npm install
COPY backend/ ./
RUN npm run build
# Stage 3: Production
FROM node:22-alpine AS production
WORKDIR /app
# Install only production deps for backend
COPY backend/package*.json ./backend/
RUN cd backend && npm install --omit=dev
# Copy compiled backend
COPY --from=build-backend /app/backend/dist ./backend/dist
# Copy built frontend into location the backend will serve
COPY --from=build-frontend /app/frontend/dist ./frontend/dist
# Data directory for SQLite
RUN mkdir -p /app/data
EXPOSE 3000
ENV NODE_ENV=production
CMD ["node", "backend/dist/index.js"]