Yooooomi / your_spotify

Self hosted Spotify tracking dashboard
GNU General Public License v3.0
2.65k stars 108 forks source link

Cannot locate database #327

Open edenraf opened 6 months ago

edenraf commented 6 months ago

When I try to install your_spotify in docker using an XML file, I get: Error response from daemon: Bind mount failed: /volume/docker/spotify/your_spotify_db does not exists

I am not sure what I am doing wrong, and I am pretty sure my config is correct:

version: "3"

services:
  server:
    image: yooooomi/your_spotify_server
    restart: always
    ports:
      - "8085:8080"
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      - API_ENDPOINT=http://localhost:8085 # This MUST be included as a valid URL in the spotify dashboard
      - CLIENT_ENDPOINT=http://localhost:3002
      - SPOTIFY_PUBLIC=__public__
      - SPOTIFY_SECRET=__secret__
      - CORS=http://localhost:3000,http://localhost:3001 # all if you want to allow every origin
  mongo:
    container_name: mongo
    image: mongo:6
    volumes:
      - ./your_spotify_db:/data/db

  web:
    image: yooooomi/your_spotify_client
    restart: always
    ports:
      - "3002:3000"
    environment:
      - API_ENDPOINT=http://localhost:8085

of course, public and secret have been redacted

javier-cr commented 6 months ago

Try this instead:

version: "3"

services:
  server:
    image: yooooomi/your_spotify_server
    restart: always
    ports:
      - "8085:8080"
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      - API_ENDPOINT=http://localhost:8085 # This MUST be included as a valid URL in the spotify dashboard
      - CLIENT_ENDPOINT=http://localhost:3002
      - SPOTIFY_PUBLIC=__public__
      - SPOTIFY_SECRET=__secret__
      - CORS=http://localhost:3000,http://localhost:3001 # all if you want to allow every origin
  mongo:
    container_name: mongo
    image: mongo:6
    volumes:
      - your_spotify_db:/data/db

  web:
    image: yooooomi/your_spotify_client
    restart: always
    ports:
      - "3002:3000"
    environment:
      - API_ENDPOINT=http://localhost:8085
volumes:
    your_spotify_db:

Note the addition of "your_spotify_db" at the end of the file there, and that I removed the "./" within the mongo block.

If this doesn't work, you honestly may want to try the linuxserver version of your_spotify instead. The web and server containers are bundled into one and I found it a lot easier to work with.

edenraf commented 5 months ago

Try this instead:

version: "3"

services:
  server:
    image: yooooomi/your_spotify_server
    restart: always
    ports:
      - "8085:8080"
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      - API_ENDPOINT=http://localhost:8085 # This MUST be included as a valid URL in the spotify dashboard
      - CLIENT_ENDPOINT=http://localhost:3002
      - SPOTIFY_PUBLIC=__public__
      - SPOTIFY_SECRET=__secret__
      - CORS=http://localhost:3000,http://localhost:3001 # all if you want to allow every origin
  mongo:
    container_name: mongo
    image: mongo:6
    volumes:
      - your_spotify_db:/data/db

  web:
    image: yooooomi/your_spotify_client
    restart: always
    ports:
      - "3002:3000"
    environment:
      - API_ENDPOINT=http://localhost:8085
volumes:
    your_spotify_db:

Note the addition of "your_spotify_db" at the end of the file there, and that I removed the "./" within the mongo block.

If this doesn't work, you honestly may want to try the linuxserver version of your_spotify instead. The web and server containers are bundled into one and I found it a lot easier to work with.

That allowed me to build and run the project! Now I just need to fix my mongo AVX support issue. Thanks!

Yooooomi commented 5 months ago

Just run mongo:4.4 max if you're having avx issues.