feat: add theme system, branding, and task logging

- Add light/dark/system theme toggle in settings
- Add DearDiary.io branding in navbar
- Add task logging for journal generation with request/response
- Rename project from TotalRecall to DearDiary
- Update Docker configuration
This commit is contained in:
lotherk
2026-03-26 20:03:52 +00:00
parent 3f9bc1f484
commit a4e7132244
28 changed files with 487 additions and 47 deletions

46
Dockerfile Normal file
View File

@@ -0,0 +1,46 @@
# Multi-stage build: Backend + Frontend
FROM oven/bun:1.1-alpine AS backend-builder
WORKDIR /app/backend
COPY backend/package*.json ./
RUN bun install
COPY backend/prisma ./prisma
RUN bunx prisma generate
COPY backend/src ./src
RUN bun build src/index.ts --outdir ./dist --target bun
FROM node:20-alpine AS frontend-builder
WORKDIR /app/frontend
COPY frontend/package*.json ./
RUN npm install
COPY frontend ./
RUN npm run build
FROM oven/bun:1.1-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
RUN addgroup --system --gid 1001 nodejs || true
# Install nginx for serving frontend
RUN apk add --no-cache nginx
# Copy backend
COPY --from=backend-builder /app/backend/dist ./dist
COPY --from=backend-builder /app/backend/node_modules ./node_modules
COPY backend/package.json .
COPY backend/prisma ./prisma
# Copy frontend build
COPY --from=frontend-builder /app/frontend/dist ./public
# Setup nginx
COPY nginx.conf /etc/nginx/http.d/default.conf
RUN mkdir -p /data /run /app/nginx_tmp /var/lib/nginx/logs && chmod 777 /var/lib/nginx/logs /var/lib/nginx/tmp && chown -R bun:nodejs /data /app
# Start everything as root
CMD sh -c "nginx -g 'daemon off;' & bunx prisma db push --accept-data-loss & bun ./dist/index.js"