feat: initialize CollabTableServer with models, sync, and notification handling
- Add go.mod and go.sum for dependency management - Implement models for List, Field, Item, ItemValue, SyncRequest, SyncResponse, and NotificationEvent - Create notification handling functions including enqueueNotification and ignoreNotificationError - Implement sync functionality to handle data synchronization between client and server - Add web data handling and notification polling endpoints - Include tests for timestamp normalization and sync logic - Embed web assets for serving the frontend application
This commit is contained in:
1 parent
e12940fef0
commit
cac2faae2e
41 files changed
+2535
-5502
No files matched your search
@@ -1,31 +1,24 @@
|
||||
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"]
|
||||
FROM node:22-alpine AS webui-builder
|
||||
WORKDIR /webui
|
||||
COPY webui/package*.json ./
|
||||
RUN npm ci
|
||||
COPY webui/ ./
|
||||
RUN npm run build
|
||||
|
||||
FROM golang:1.26-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY *.go ./
|
||||
COPY --from=webui-builder /webui/build ./web
|
||||
RUN apk add --no-cache ca-certificates && \
|
||||
CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o server .
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /app/server /server
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
USER 65534:65534
|
||||
EXPOSE 3000
|
||||
VOLUME ["/data"]
|
||||
ENV PORT=3000
|
||||
ENTRYPOINT ["/server"]
|
||||
Reference in new issue
Block a user