CasaOS-AppStore icon indicating copy to clipboard operation
CasaOS-AppStore copied to clipboard

[Bug] AnythingLLM unproper docker-compose file config

Open xoconoch opened this issue 1 year ago • 0 comments

Describe the bug As it is, the current docker-compose file published on the app store has a volume misconfiguration that causes the .env file to not bind properly, which breaks the installation after a version update.

To Reproduce Steps to reproduce the behavior:

  1. Install AnythingLLM via the app store and create a user (you will have to select the "My team" option during the first boot)
  2. Change the image tag, the icon or do anything to trigger a re-composing of the container via the web-UI
  3. After it finishes re-composing, try to login using the previously created credentials, it will trigger the error "Could not validate login"

Expected behavior

If the .env file is previously binded correctly, this behavior is completely fixed. However, it is important to note that the .env file has to be created via touch or some other method in the expected location before composing the container, if it isn't and yet declared in the compose file as such:

    volumes:
      - type: bind
        source: /DATA/AppData/anythingllm/storage
        target: /app/server/storage
      # bind the .env file  
      - type: bind
        source: /DATA/AppData/anythingllm/storage/.env
        target: /app/server/.env

what will happen is that a directory named ".env" will be created instead of a file, thus failing the install. This is the reason I didn't submit a pull request to correct the docker-compose file, because I currently don't know how to workaround this error. One way I could think of is if there could be a pre-installation script added that created the .env file and then make the compose file run. If anybody's got any ideas, please hand 'em!

xoconoch avatar Dec 20 '24 22:12 xoconoch