- Introduced a new authentication system using session cookies for the web dashboard and API tokens for sync clients. - Replaced the old SERVER_PASSWORD scheme with a more secure API token mechanism. - Added routes for user setup, login, logout, and credential updates. - Implemented middleware to require session and API token for protected routes. - Updated web UI to handle authentication states and provide user feedback. - Enhanced error handling in API requests and responses. - Updated README to reflect new authentication flow and database requirements.
32 lines
532 B
Docker
32 lines
532 B
Docker
FROM node:20-alpine AS webui-builder
|
|
WORKDIR /webui
|
|
COPY webui/package*.json ./
|
|
RUN npm install
|
|
COPY webui/ .
|
|
RUN npm run build
|
|
|
|
FROM node:20-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY package*.json ./
|
|
|
|
# Install dependencies
|
|
RUN npm install
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build TypeScript
|
|
RUN npm run build
|
|
|
|
# Built webui, served by webRoutes.ts from ./web (sibling of dist/)
|
|
COPY --from=webui-builder /webui/build ./web
|
|
|
|
# Expose port
|
|
EXPOSE 3000
|
|
|
|
# Start the application
|
|
CMD ["npm", "start"]
|