Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法保存到后端数据库。如果问题持续存在,您应该保存文件到本地,以确保您的工作不会丢失。 #41

Open
xvbai0317 opened this issue Dec 12, 2023 · 11 comments
Labels
support Support user's cases(community driven)

Comments

@xvbai0317
Copy link

92d791f896c0cf27d39557c10bd36a4e
307fb03b94f035c9e2d47fd41591e35f

@xvbai0317
Copy link
Author

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:
- "6379:6379"

@xvbai0317
Copy link
Author

可以直接改成mysql://用户名:密码@localhost:3306吗

@alswl
Copy link
Owner

alswl commented Dec 12, 2023

你使用的镜像都不是我提供的,是不是找错了仓库了?

@xvbai0317
Copy link
Author

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"

@xvbai0317
Copy link
Author

bc73ff073262c0979544b938710ba921
这个改了之后会抱这个错误,能请教一下您吗?

@alswl
Copy link
Owner

alswl commented Dec 12, 2023

你可以查看 https://github.com/alswl/excalidraw-storage-backend 源码。另外参考 https://github.com/jaredwray/keyv 如何使用 MySQL 连接。

@leesonaa
Copy link

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都不在这个网桥组里,那肯定不能通过主机名去访问呀。

@xvbai0317
Copy link
Author

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数据库应该怎么改呢

@leesonaa
Copy link

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里。

@xvbai0317
Copy link
Author

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里。

8940b063ac80969a3ed61300c75e8741
我按您说的做了,然后就发生了这个问题,这个应该怎么解决,我再去试试

@leesonaa
Copy link

服务:前端:图像: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里。

8940b063ac80969a3ed61300c75e8741 我按你说的做了,然后就出现了这个问题,这个应该怎么解决,我再去尝试一下

我没用mysql,我用的mongodb,保存也仅仅是以文件方式保存到客户端的本地。

@alswl alswl added the support Support user's cases(community driven) label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Support user's cases(community driven)
Projects
None yet
Development

No branches or pull requests

3 participants