alswl / excalidraw-collaboration

excalidraw with collaboration feature, self-hosting, and only one-click deploy
MIT License
391 stars 67 forks source link

405 (Method Not Allowed) #43

Open matbgn opened 11 months ago

matbgn commented 11 months ago

Hi and thank you for your amazing work, really! Excalidraw is beautiful, but at the same time when it's coming to self-host it's a mess and your work is incredibly valuable in that sense.

After reading up all across the issues, I came to a partially working state. Everything is accessible online behind a Caddy reverse proxy on TLS certificated, the collaborative part is fully functional and reactive, but the storage does not work. Everything else is (I mean vector drawings works unitl reload or image upload).

Any clue on this error?

       GET https://whiteboard.example.com/api/v2/rooms/cce8fbeb3e5a183484a5 404 (Not Found)
tq @ httpStorage.ts:66
(anonymous) @ Collab.tsx:242
await in (anonymous) (async)
Nq.zs.leading @ Collab.tsx:802
h @ index.js:160
S @ index.js:240
(anonymous) @ Collab.tsx:782
h @ index.tsx:566
componentDidUpdate @ App.tsx:2091
lw @ react-dom.production.min.js:261
O8 @ react-dom.production.min.js:260
OP @ react-dom.production.min.js:259
$P @ react-dom.production.min.js:283
fs @ react-dom.production.min.js:281
D8 @ react-dom.production.min.js:270
S @ scheduler.production.min.js:13
O @ scheduler.production.min.js:14
httpStorage.ts:248 

Seems weird that GET, will not be recognized noop?

Here my Caddyfile

whiteboard.example.com {
    reverse_proxy 192.168.3.202:8880
}

whiteboard.example.com/api/v2 {
    reverse_proxy 192.168.3.202:8881
}

whiteboard.example.com/socket.io/ {
    reverse_proxy 192.168.3.202:8882
}

And here the compose.yaml

services:
  frontend:
    image: alswl/excalidraw:v0.17.0-fork-b2
    environment:
      - VITE_APP_BACKEND_V2_GET_URL=https://whiteboard.example.com/api/v2/
      - VITE_APP_BACKEND_V2_POST_URL=https://whiteboard.example.com/api/v2/post/
      - VITE_APP_WS_SERVER_URL=https://whiteboard.example.com
      - VITE_APP_FIREBASE_CONFIG={}
      - VITE_APP_HTTP_STORAGE_BACKEND_URL=https://whiteboard.example.com/api/v2
      - VITE_APP_STORAGE_BACKEND=http
    ports:
      - 8880:80
  storage:
    image: alswl/excalidraw-storage-backend:v2023.11.11
    restart: always
    environment:
      # docs https://github.com/alswl/excalidraw-storage-backend#environement-variables
      - PORT=8081
    ports:
      - 8881:8081
  room:
    image: excalidraw/excalidraw-room:sha-49bf529
    ports:
      - 8882:80
networks: {}
alswl commented 11 months ago

Yes, it seems strange, I'll setup a Candy env to reproduce it.