first commit

This commit is contained in:
2025-12-13 20:08:01 +01:00
commit cc34dd0fd9
21 changed files with 5645 additions and 0 deletions

38
Dockerfile Normal file
View File

@@ -0,0 +1,38 @@
# Build Frontend
FROM node:22-alpine as build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
# Build-time variables
ARG VITE_ADMIN_PIN
ENV VITE_ADMIN_PIN=$VITE_ADMIN_PIN
RUN npm run build
# Production Server (Node.js)
FROM node:22-alpine
WORKDIR /app
# Install only production dependencies for the server
COPY package*.json ./
RUN npm install --omit=dev
# Copy built frontend
COPY --from=build /app/dist ./dist
# Copy backend source
COPY server.js .
# Create storage directories
RUN mkdir -p uploads data
ENV PORT=8080
EXPOSE 8080
CMD ["node", "server.js"]