[READ-ONLY] Mirror of https://github.com/FoxxMD/tldraw-selfhosted. A dockerized, selfhostable version of multiplayer tldraw
docker tldraw whiteboard
0

Configure Feed

Select the types of activity you want to include in your feed.

Optimize image

FoxxMD (Sep 30, 2025, 2:56 PM EDT) 2de36343 d7ef25fb

+33 -15
+24 -6
Dockerfile
··· 1 1 FROM node:22-alpine as base 2 2 3 - RUN apk add --no-cache dumb-init git 3 + RUN apk add --no-cache dumb-init 4 4 5 - RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 5 + WORKDIR /usr/src/app 6 + 7 + FROM base as deps 8 + 9 + COPY --chown=node:node package.json yarn.lock /usr/src/app/ 6 10 7 - ENV TZ=Etc/GMT 11 + RUN yarn install 8 12 9 - WORKDIR /usr/src/app 13 + FROM deps as builder 10 14 11 15 COPY --chown=node:node . /usr/src/app 12 16 13 - RUN yarn install 17 + RUN yarn build 14 18 15 - CMD ["yarn","run","dev-node"] 19 + FROM deps as prod-deps 20 + 21 + RUN yarn install --production 22 + 23 + FROM base as app 24 + 25 + COPY --chown=node:node --from=builder /usr/src/app/dist /usr/src/app/dist 26 + COPY --chown=node:node --from=prod-deps /usr/src/app/node_modules /usr/src/app/node_modules 27 + 28 + ENV NODE_ENV=production \ 29 + CONFIG_DIR=/config 30 + 31 + WORKDIR /usr/src/app 32 + 33 + CMD ["dumb-init", "node", "dist/src/server/server.node.js"]
+9 -9
package.json
··· 27 27 "lint": "yarn run -T tsx ../../internal/scripts/lint.ts" 28 28 }, 29 29 "devDependencies": { 30 + "@tldraw/sync": "4.0.2", 30 31 "@types/bun": "^1.1.6", 31 32 "@types/express": "^4.17.21", 32 33 "@types/react": "^18.3.18", 33 34 "@types/react-dom": "^18.3.5", 34 35 "@types/ws": "^8.18.1", 36 + "@vitejs/plugin-react-swc": "^3.10.2", 35 37 "concurrently": "^9.1.2", 38 + "itty-router": "^5.0.18", 36 39 "lazyrepo": "0.0.0-alpha.27", 40 + "react": "^18.3.1", 41 + "react-dom": "^18.3.1", 42 + "react-router-dom": "^6.28.2", 43 + "tldraw": "4.0.2", 37 44 "tsx": "^4.19.2", 38 - "typescript": "^5.8.3" 45 + "typescript": "^5.8.3", 46 + "vite": "^7.0.1" 39 47 }, 40 48 "dependencies": { 41 49 "@fastify/cors": "^11.0.1", 42 50 "@fastify/static": "^8.2.0", 43 51 "@fastify/websocket": "^11.0.1", 44 - "@tldraw/sync": "4.0.2", 45 52 "@tldraw/sync-core": "4.0.2", 46 - "@vitejs/plugin-react-swc": "^3.10.2", 47 53 "fastify": "5.4.0", 48 - "itty-router": "^5.0.18", 49 - "react": "^18.3.1", 50 - "react-dom": "^18.3.1", 51 - "react-router-dom": "^6.28.2", 52 - "tldraw": "4.0.2", 53 54 "unfurl.js": "^6.4.0", 54 - "vite": "^7.0.1", 55 55 "ws": "^8.18.0" 56 56 } 57 57 }