Open xvbai0317 opened 11 months ago
version: "3.8"
services: excalidraw: image: kiliandeca/excalidraw healthcheck: disable: true ports:
"80:80" environment: BACKEND_V2_GET_URL: http://localhost:8080/api/v2/scenes/ BACKEND_V2_POST_URL: http://localhost:8080/api/v2/scenes/ LIBRARY_URL: https://libraries.excalidraw.com LIBRARY_BACKEND: https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries SOCKET_SERVER_URL: http://localhost:5000/ STORAGE_BACKEND: "http" HTTP_STORAGE_BACKEND_URL: "http://localhost:8080/api/v2"
excalidraw-storage-backend: build: . ports:
"8080:8080" environment: STORAGE_URI: redis://redis:6379
excalidraw-room: image: excalidraw/excalidraw-room ports:
"5000:80"
redis: image: redis ports:
可以直接改成mysql://用户名:密码@localhost:3306吗
你使用的镜像都不是我提供的,是不是找错了仓库了?
services: frontend: image: alswl/excalidraw:v0.17.0-fork-b2 environment:
80:80
storage: image: alswl/excalidraw-storage-backend:v2023.11.11 restart: always environment: # docs https://github.com/alswl/excalidraw-storage-backend#environement-variables
8081:8081
room: image: excalidraw/excalidraw-room:sha-49bf529 ports:
8082:80
redis: image: redis ports:
这个改了之后会抱这个错误,能请教一下您吗?
你可以查看 https://github.com/alswl/excalidraw-storage-backend 源码。另外参考 https://github.com/jaredwray/keyv 如何使用 MySQL 连接。
services: frontend: image: alswl/excalidraw:v0.17.0-fork-b2 environment: - VITE_APP_BACKEND_V2_GET_URL=https://test.com/api/v2/ - VITE_APP_BACKEND_V2_POST_URL=https://test.com/api/v2/post/ - VITE_APP_WS_SERVER_URL=http://127.0.0.1:8082 - VITE_APP_FIREBASE_CONFIG={} # alswl'fork env # forked excalidraw can use env alswl/excalidraw#5 - VITE_APP_HTTP_STORAGE_BACKEND_URL=http://127.0.0.1:8081/api/v2 - VITE_APP_STORAGE_BACKEND=http ports: - 80: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 - STORAGE_URI=mysql://root:sjl.0927@localhost:3306 ports: - 8081:8081
room: image: excalidraw/excalidraw-room:sha-49bf529 ports: - 8082:80
redis: image: redis ports: - "6379:6379"
你的mysql都不在这个网桥组里,那肯定不能通过主机名去访问呀。
services: frontend: image: alswl/excalidraw:v0.17.0-fork-b2 environment: - VITE_APP_BACKEND_V2_GET_URL=https://test.com/api/v2/ - VITE_APP_BACKEND_V2_POST_URL=https://test.com/api/v2/post/ - VITE_APP_WS_SERVER_URL=http://127.0.0.1:8082 - VITE_APP_FIREBASE_CONFIG={} # alswl'fork env # forked excalidraw can use env alswl/excalidraw#5 - VITE_APP_HTTP_STORAGE_BACKEND_URL=http://127.0.0.1:8081/api/v2 - VITE_APP_STORAGE_BACKEND=http ports: - 80: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 - STORAGE_URI=mysql://root:sjl.0927@localhost:3306 ports: - 8081:8081 room: image: excalidraw/excalidraw-room:sha-49bf529 ports: - 8082:80 redis: image: redis ports: - "6379:6379"
你的mysql都不在这个网桥组里,那肯定不能通过主机名去访问呀。
请教一下,那我要想存在本地的mysql数据库应该怎么改呢
services: frontend: image: alswl/excalidraw:v0.17.0-fork-b2 environment: - VITE_APP_BACKEND_V2_GET_URL=https://test.com/api/v2/ - VITE_APP_BACKEND_V2_POST_URL=https://test.com/api/v2/post/ - VITE_APP_WS_SERVER_URL=http://127.0.0.1:8082 - VITE_APP_FIREBASE_CONFIG={} # alswl'fork env # forked excalidraw can use env alswl/excalidraw#5 - VITE_APP_HTTP_STORAGE_BACKEND_URL=http://127.0.0.1:8081/api/v2 - VITE_APP_STORAGE_BACKEND=http ports: - 80: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 - STORAGE_URI=mysql://root:sjl.0927@localhost:3306 ports: - 8081:8081 room: image: excalidraw/excalidraw-room:sha-49bf529 ports: - 8082:80 redis: image: redis ports: - "6379:6379"
你的mysql都不在这个网桥组里,那肯定不能通过主机名去访问呀。
请教一下,那我要想存在本地的mysql数据库应该怎么改呢
STORAGE_URI=mysql://root:sjl.0927@localhost:3306 你这段不对吧,把localhost改成你mysql映射的那个宿主的ip地址才行吧 因为 我看上面你的mysql并不在这个compose里。
services: frontend: image: alswl/excalidraw:v0.17.0-fork-b2 environment: - VITE_APP_BACKEND_V2_GET_URL=https://test.com/api/v2/ - VITE_APP_BACKEND_V2_POST_URL=https://test.com/api/v2/post/ - VITE_APP_WS_SERVER_URL=http://127.0.0.1:8082 - VITE_APP_FIREBASE_CONFIG={} # alswl'fork env # forked excalidraw can use env alswl/excalidraw#5 - VITE_APP_HTTP_STORAGE_BACKEND_URL=http://127.0.0.1:8081/api/v2 - VITE_APP_STORAGE_BACKEND=http ports: - 80: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 - STORAGE_URI=mysql://root:sjl.0927@localhost:3306 ports: - 8081:8081 room: image: excalidraw/excalidraw-room:sha-49bf529 ports: - 8082:80 redis: image: redis ports: - "6379:6379"
你的mysql都不在这个网桥组里,那肯定不能通过主机名去访问呀。
请教一下,那我要想存在本地的mysql数据库应该怎么改呢
STORAGE_URI=mysql://root:sjl.0927@localhost:3306 你这段不对吧,把localhost改成你mysql映射的那个宿主的ip地址才行吧 因为 我看上面你的mysql并不在这个compose里。
我按您说的做了,然后就发生了这个问题,这个应该怎么解决,我再去试试
服务:前端:图像:alswl/excalidraw:v0.17.0-fork-b2 环境:- VITE_APP_BACKEND_V2_GET_URL=https://test.com/api/v2/ - VITE_APP_WS_SERVER_URL=https://test.com/api/v2/post/ - VITE_APP_BACKEND_V2_POST_URL= - VITE_APP_FIREBASE_CONFIG={} # alswl'fork env # forked excalidraw 可以使用 env alswl /excalidraw#5 - VITE_APP_HTTP_STORAGE_BACKEND_URL=http://127.0.0.1:8081/api/v2 - VITE_APP_STORAGE_BACKEND= HTTP 端口:- 80:80 存储:图像:alswl/excalidraw-storage-backend:v2023.11.11 重新启动:始终环境:# docs https://github.com/alswl/excalidraw-storage-backend#environement-variables - PORT=8081 - STORAGE_URI=mysql://root:sjl.0927@localhost:3306 端口:- 8081:8081 房间:图像:excalidraw/excalidraw-room:sha-49bf529 端口:- 8082:80 redis:图像:redis 端口:-“6379:6379”
你的mysql都不在这个网桥组里,那肯定不能通过主机名去访问呀。
请教一下,那我原来存在本地的mysql数据库应该怎么改呢?
STORAGE_URI=mysql://root:sjl.0927@localhost:3306 你大概不对吧,把localhost改成你mysqlmap的那个ip地址才行吧因为我上面看你的mysql不在这个compose里。
我按你说的做了,然后就出现了这个问题,这个应该怎么解决,我再去尝试一下
我没用mysql,我用的mongodb,保存也仅仅是以文件方式保存到客户端的本地。
我也遇到,偶尔发生这种问题,一般是在和远程共享白板协作过程中
@alswl help!
我也遇到的这个问题。只要协作就会出现。用的也是大佬的镜像。
services:
frontend:
image: alswl/excalidraw:v0.17.3-fork-b1
environment:
- VITE_APP_BACKEND_V2_GET_URL=https://10.35.144.14:2086/api/v2/scenes/
- VITE_APP_BACKEND_V2_POST_URL=https://10.35.144.14:2086/api/v2/scenes/
- VITE_APP_WS_SERVER_URL=https://10.35.144.14:2087
- VITE_APP_FIREBASE_CONFIG={}
- VITE_APP_HTTP_STORAGE_BACKEND_URL=https://10.35.144.14:2086/api/v2
- VITE_APP_STORAGE_BACKEND=https
ports:
- 7080: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
- STORAGE_URI=pg://excalidraw:excalidraw@10.35.144.15:5432/exca
ports:
- 8081:8081
room:
image: excalidraw/excalidraw-room:sha-49bf529
ports:
- 8082:80
使用了https反代,postgre数据库。目前只要一协作就报无法保存到数据库。
excalidraw-storage-backend容器报这个错误:
> excalidraw-storage-backend@0.0.1 start:prod
> node dist/main
[Nest] 17 - 07/27/2024, 3:10:35 AM LOG [NestFactory] Starting Nest application...
[Nest] 17 - 07/27/2024, 3:10:35 AM ERROR [ExceptionHandler] The "id" argument must be of type string. Received undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:406:5)
at validateString (node:internal/validators:162:11)
at Module.require (node:internal/modules/cjs/loader:1108:3)
at require (node:internal/modules/helpers:130:18)
at loadStore (/app/node_modules/keyv/src/index.js:22:15)
at new Keyv (/app/node_modules/keyv/src/index.js:50:22)
at /app/dist/storage/storage.service.js:25:26
at Array.forEach (<anonymous>)
at new StorageService (/app/dist/storage/storage.service.js:24:39)
at Injector.instantiateClass (/app/node_modules/@nestjs/core/injector/injector.js:330:19)
@alswl help!
我也遇到的这个问题。只要协作就会出现。用的也是大佬的镜像。
services: frontend: image: alswl/excalidraw:v0.17.3-fork-b1 environment: - VITE_APP_BACKEND_V2_GET_URL=https://10.35.144.14:2086/api/v2/scenes/ - VITE_APP_BACKEND_V2_POST_URL=https://10.35.144.14:2086/api/v2/scenes/ - VITE_APP_WS_SERVER_URL=https://10.35.144.14:2087 - VITE_APP_FIREBASE_CONFIG={} - VITE_APP_HTTP_STORAGE_BACKEND_URL=https://10.35.144.14:2086/api/v2 - VITE_APP_STORAGE_BACKEND=https ports: - 7080: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 - STORAGE_URI=pg://excalidraw:excalidraw@10.35.144.15:5432/exca ports: - 8081:8081 room: image: excalidraw/excalidraw-room:sha-49bf529 ports: - 8082:80
使用了https反代,postgre数据库。目前只要一协作就报无法保存到数据库。
excalidraw-storage-backend容器报这个错误:
> excalidraw-storage-backend@0.0.1 start:prod > node dist/main [Nest] 17 - 07/27/2024, 3:10:35 AM LOG [NestFactory] Starting Nest application... [Nest] 17 - 07/27/2024, 3:10:35 AM ERROR [ExceptionHandler] The "id" argument must be of type string. Received undefined TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received undefined at new NodeError (node:internal/errors:406:5) at validateString (node:internal/validators:162:11) at Module.require (node:internal/modules/cjs/loader:1108:3) at require (node:internal/modules/helpers:130:18) at loadStore (/app/node_modules/keyv/src/index.js:22:15) at new Keyv (/app/node_modules/keyv/src/index.js:50:22) at /app/dist/storage/storage.service.js:25:26 at Array.forEach (<anonymous>) at new StorageService (/app/dist/storage/storage.service.js:24:39) at Injector.instantiateClass (/app/node_modules/@nestjs/core/injector/injector.js:330:19)
经过一番折腾,发现不使用https,而使用localhost,是可以使用的。那么就是经过https反代就出现了问题。后来参考大佬的https://github.com/alswl/excalidraw-collaboration/tree/master/advanced-nginx 终于成功了。 1、我用的redis,mongo和postgre有莫名的错。
proxy_set_header Host $http_host;