Initial commit

This commit is contained in:
fabritsky
2026-05-25 09:45:08 +00:00
commit 662842019c
34 changed files with 10033 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
# Stage 1: Build the frontend React app
FROM node:20-slim AS frontend-builder
WORKDIR /app/frontend
COPY frontend/package*.json ./
RUN npm install
COPY frontend/ ./
RUN npm run build
# Stage 2: Setup the backend and copy build output
FROM node:20-slim
WORKDIR /app
COPY backend/package*.json ./backend/
WORKDIR /app/backend
RUN npm install --only=production
# Copy backend source
COPY backend/ ./
# Copy built frontend from Stage 1 into the backend public static directory
COPY --from=frontend-builder /app/frontend/dist ./public
# Set default env variables
ENV PORT=3000
ENV NODE_ENV=production
ENV DATABASE_PATH=/app/data/database.db
# Create persistent storage folder for SQLite database
RUN mkdir -p /app/data
EXPOSE 3000
CMD ["node", "server.js"]