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

Self Hosted Collab Excalidraw with containers #366

Open
lunitaris opened this issue Oct 24, 2023 · 8 comments
Open

Self Hosted Collab Excalidraw with containers #366

lunitaris opened this issue Oct 24, 2023 · 8 comments

Comments

@lunitaris
Copy link

lunitaris commented Oct 24, 2023

Hello,

I want to setup a self hosted environnement using the 2 containers: excalidraw and excalidraw-room
There is no documentation on how to connect / link the client to the server..

I tried to set the variable REACT_APP_WS_SERVER_URL, but nothing.
Could you guys help me please?
How to make this work?

docker pull docker.io/excalidraw/excalidraw
docker pull docker.io/excalidraw/excalidraw-room

docker run -d -p 8081:80 excalidraw/excalidraw-room:latest
docker run -d -p 8080:80 -e REACT_APP_WS_SERVER_URL=http://127.0.0.1:8081 excalidraw/excalidraw:latest

Thx

@JannikStreek
Copy link

Have a look at this docker compose setup, maybe it helps? https://github.com/b310-digital/excalidraw/blob/master/docker-compose.yml

@Fofanius
Copy link

Fofanius commented Jan 8, 2024

I tried to use this docker-compose using portainer and at some point it fails.

Start of logs:

2024/01/08 10:25AM WRN github.com/portainer/portainer/pkg/libstack/compose/internal/composeplugin/composeplugin.go:162 > docker compose command failed | error="exit status 17" error_output=" excalidraw-room Pulling 

* pull and extract logs*

End of logs:

 1b181a7bfdfb Extracting [==================================================>]  2.751kB/2.751kB
 1b181a7bfdfb Pull complete 
 excalidraw-room Pulled 
failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount624288113/Dockerfile: no such file or directory
" output="#1 [excalidraw internal] load build definition from Dockerfile
#1 transferring dockerfile: 2B done
#1 DONE 0.0s

#2 [excalidraw internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [excalidraw-storage-backend internal] load git source https://github.com/kitsteam/excalidraw-storage-backend.git#main
#3 CANCELED
"

I haven't figured out how to solve this yet.

@JannikStreek
Copy link

I tried to use this docker-compose using portainer and at some point it fails.

Start of logs:

2024/01/08 10:25AM WRN github.com/portainer/portainer/pkg/libstack/compose/internal/composeplugin/composeplugin.go:162 > docker compose command failed | error="exit status 17" error_output=" excalidraw-room Pulling 
  • pull and extract logs*

End of logs:

 1b181a7bfdfb Extracting [==================================================>]  2.751kB/2.751kB
 1b181a7bfdfb Pull complete 
 excalidraw-room Pulled 
failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount624288113/Dockerfile: no such file or directory
" output="#1 [excalidraw internal] load build definition from Dockerfile
#1 transferring dockerfile: 2B done
#1 DONE 0.0s

#2 [excalidraw internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [excalidraw-storage-backend internal] load git source https://github.com/kitsteam/excalidraw-storage-backend.git#main
#3 CANCELED
"

I haven't figured out how to solve this yet.

can you try using image: ghcr.io/kitsteam/excalidraw-storage-backend:v0.1.0 instead of

build: 
      context: https://github.com/kitsteam/excalidraw-storage-backend.git#main
      target: production

@Fofanius
Copy link

Fofanius commented Jan 8, 2024

Still Deploymend error but with a little change at the end:

 494007c5b92c Pull complete 
 excalidraw-storage-backend Pulled 
failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount483607257/Dockerfile: no such file or directory
" output="#1 [excalidraw internal] load build definition from Dockerfile
#1 transferring dockerfile: 2B done
#1 DONE 0.0s

#2 [excalidraw internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s

and after reboot my homelab server

2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | error="exit status 17" 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | error="exit status 17" error_output="failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount4186509642/Dockerfile: no such file or directory
" 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | error="exit status 17" 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | error="exit status 17" error_output="failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount4186509642/Dockerfile: no such file or directory
" output="#1 [excalidraw internal] load build definition from Dockerfile
#1 transferring dockerfile: 2B done
#1 DONE 0.0s

#2 [excalidraw internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s
"
"

There might be some problems in my docker-compose script because I added some little changes, so I'll attach that too :

version: "3.8"

services:
  excalidraw:
    stdin_open: true
    build:
      context: .
      target: development
    container_name: excalidraw
    ports:
      - "3050:3000"
    restart: on-failure
    healthcheck:
      disable: true
    environment:
      - NODE_ENV=development
    volumes:
      - node_modules:/opt/node_app/node_modules
      - ./:/opt/node_app/
    networks:
      - excalidraw-net
      - reverse-proxy-net

  excalidraw-storage-backend:
    stdin_open: true
    image: ghcr.io/kitsteam/excalidraw-storage-backend:v0.1.0
    ports:
      - "3051:8080"
    environment:
      STORAGE_URI: redis://:${REDIS_PASSWORD}@redis:6379
      STORAGE_TTL: 2592000000
    networks:
      - excalidraw-net
      - reverse-proxy-net

  excalidraw-room:
    image: excalidraw/excalidraw-room
    ports:
      - "3052:80"
    networks:
      - excalidraw-net
      - reverse-proxy-net
  
  redis:
    image: redis
    command: redis-server --requirepass ${REDIS_PASSWORD}
    volumes:
      - redis_data:/data
    networks:
      - excalidraw-net
      - reverse-proxy-net

volumes:
  redis_data:
  node_modules:   

networks:
  excalidraw-net:
    name: excalidraw-net
    external: true
  reverse-proxy-net:
    name: reverse-proxy-net
    external: true

@Fofanius
Copy link

Fofanius commented Jan 9, 2024

Ok, first of all there was my mistake at line 7, there is . instead of https://github.com/b310-digital/excalidraw.git#master.
But replacing didn't help ... :(

2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | error="exit status 17" 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | error="exit status 17" error_output="failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount4186509642/Dockerfile: no such file or directory
" 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | error="exit status 17" 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > 2024/01/08 07:02PM 2024/01/08 07:02PM WRN 2024/01/08 07:02PM 2024/01/08 07:02PM WRN composeplugin/composeplugin.go:162 > docker compose command failed | error="exit status 17" error_output="failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount4186509642/Dockerfile: no such file or directory
" output="#1 [excalidraw internal] load build definition from Dockerfile
#1 transferring dockerfile: 2B done
#1 DONE 0.0s

#2 [excalidraw internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s
"

@Fofanius
Copy link

Fofanius commented Jan 9, 2024

Well, I managed to deploy it in Portainer with next docker-compose script:

version: "3.8"

services:
  excalidraw:
    stdin_open: true
    build:
      context: https://github.com/b310-digital/excalidraw.git#master
      target: development
    container_name: excalidraw
    ports:
      - "3000:3000"
    restart: on-failure
    healthcheck:
      disable: true
    environment:
      - NODE_ENV=development
    volumes:
      - node_modules:/opt/node_app/node_modules
      - ./:/opt/node_app/
    networks:
      - excalidraw-net
      - reverse-proxy-net

  excalidraw-storage-backend:
    stdin_open: true
    build: 
      context: https://github.com/kitsteam/excalidraw-storage-backend.git#main
      target: production
    ports:
      - "8080:8080"
    environment:
      STORAGE_URI: redis://:${REDIS_PASSWORD}@redis:6379
      STORAGE_TTL: 2592000000
    networks:
      - excalidraw-net
      - reverse-proxy-net

  excalidraw-room:
    image: excalidraw/excalidraw-room
    ports:
      - "5001:80"
    networks:
      - excalidraw-net
      - reverse-proxy-net
  
  redis:
    image: redis
    command: redis-server --requirepass ${REDIS_PASSWORD}
    volumes:
      - redis_data:/data
    networks:
      - excalidraw-net
      - reverse-proxy-net

volumes:
  redis_data:
  node_modules:   

networks:
  excalidraw-net:
    name: excalidraw-net
    external: true
  reverse-proxy-net:
    name: reverse-proxy-net
    external: true

BUT collaboration still does not work with following pop-up message: Error \n Couldn't connect to the collab server. Please reload the page and try again.

@Fofanius
Copy link

Fofanius commented Feb 8, 2024

Have a look at this docker compose setup, maybe it helps? https://github.com/b310-digital/excalidraw/blob/master/docker-compose.yml

Even if I clone the repository completely and run docker-compose from it on my local machine, all containers seem to start, but nothing happens in them (no logs) and the ability to collaborate is still missing :(

Any ideas?

image
image

@JannikStreek
Copy link

well, check the logs...docker compose logs excalidraw-storage-backend, most likely its database related, e.g. you haven't provided the .env file. A default is existing, but you need to provide your own, otherwise database stuff is missing. This is not really issue related anymore, so you can write me a mail (see commit mail) but it's not really issue related anymore ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants