version: "3.8"
services:
  excalidraw:
    build:
      context: .
      args:
        - NODE_ENV=development
    container_name: excalidraw-instance
    ports:
      - "0.0.0.0:11900:80"
    restart: on-failure
    stdin_open: true
    healthcheck:
      disable: true
    environment:
      - NODE_ENV=development
      # Collaboration backend
      - VITE_APP_BACKEND_V2_GET_URL=https://free.excalidraw.com/api/v2/scenes/
      - VITE_APP_BACKEND_V2_POST_URL=https://free.excalidraw.com/api/v2/scenes/
      - VITE_APP_WEBSOCKET_URL=wss://free.excalidraw.com/socket.io
      - VITE_APP_LIBRARY_URL=https://free.excalidraw.com/libraries
      # Encryption and collaboration flags
      - VITE_FF_LIVE_COLLABORATION=true
      - VITE_FF_ENCRYPTION=true
      - VITE_FF_ENCRYPTION_KEY_BITS=128
      # Additional required settings
      - VITE_APP_PORTAL_URL=""
      - VITE_APP_SUPPORTS_OPENID=false
    volumes:
      - ./:/opt/node_app/app:delegated
      - ./package.json:/opt/node_app/package.json
      - ./yarn.lock:/opt/node_app/yarn.lock
      - /media/thoth/excalidraw/data:/opt/node_app/app/data
      - notused:/opt/node_app/app/node_modules
volumes:
  notused:
