ownphotos icon indicating copy to clipboard operation
ownphotos copied to clipboard

Scan Directory Change has no effect

Open ThanatopsisJSH opened this issue 5 years ago • 8 comments

I installed using the docker image on Windows, I have set the volumes in the docker-compose.yml file.

When logging in as admin and changing the scan directory I click update but the value is not saved. The scan directoty selection also shows no volumes/folders to select below the entry field. neither ./data/, /data/ or /data do anything.

When I press update I am back in the admin area and the values are still on "not set".

ThanatopsisJSH avatar Apr 17 '19 19:04 ThanatopsisJSH

same here, in the browser console you will find a failed request (error 400) with content

{"scan_directory":["This field may not be blank."]}

on the logs level, even with DEBUG=true you can't find anything.

MartinVerges avatar Apr 30 '19 21:04 MartinVerges

Can you post your docker-compose.yml? and the ls output of the directory mounted to the /data/ volume? It needs to be not empty.

guysoft avatar May 05 '19 08:05 guysoft

same issue here

the /data folder ist visible on the backend

[root@rancher rancher]# docker exec -it ownphotos-backend df -h | grep data
10.10.10.15:/nfs/share/10_media/00_photos  2.7T  1.8T  877G  68% /data

i noticed i can't save a profile picture aswell. could be related

my docker-compose file:

version: '2'

services:

  proxy:
    image: guysoft/ownphotos-proxy
    tty: true
    container_name: ownphotos-proxy
    restart: always
    links:
      - "backend:backend"
      - "frontend:frontend"
    ports:
      - "3000:80"
      
  ownphotos-db:
    image: postgres
    container_name: ownphotos-db
    restart: always
    environment:
    # This db password is internal, you can change it if you want, but also change it in ownphotos-backend container
      - POSTGRES_PASSWORD=AaAa1234
      - POSTGRES_DB=ownphotos
    volumes:
      - ownphotos_data:/var/lib/postgresql/data

  frontend:
    image: hooram/ownphotos-frontend:dev
    container_name: ownphotos-frontend
    tty: true
    environment:
       # This is the path to the backend host public facing. if your website is ownphotos.org then this should be "ownphotos.org".
       # Default here is assuming you are running on localhost on port 3000 as given in ownphotos-proxy service
       - BACKEND_HOST=10.10.10.30:3000 # CHANGE ME IF YOU WANT
    links:
      - "backend:backend"

  backend:
    image: hooram/ownphotos:dev
    container_name: ownphotos-backend
    volumes:
      - /nfs/nas01/10_media/00_photos:/data # CHANGE ME
      - ownphotos_data:/code/protected_media # CHANGE ME
      - ownphotos_data:/code/logs # CHANGE ME
    environment:
      - SECRET_KEY=pass # CHANGE ME
      - BACKEND_HOST=backend # DON'T CHANGE ME
      - [email protected] # CHANGE ME
      - ADMIN_USERNAME=oceanic # CHANGE ME
      - ADMIN_PASSWORD=pass # CHANGE ME
      - DEBUG=false
      - DB_BACKEND=postgresql
      - DB_NAME=ownphotos
      - DB_USER=postgres
      - DB_PASS=AaAa1234
      - DB_HOST=ownphotos-db
      - DB_PORT=5432
      - REDIS_HOST=ownphotos-redis
      - REDIS_PORT=6379
      - MAPBOX_API_KEY=apikey # CHANGE ME - sign up at mapbox.com for an api key. You need this for reverse geocoding. 
    links:
      - "ownphotos-db:ownphotos-db"
      - "ownphotos-redis:ownphotos-redis"
  
  ownphotos-redis:
    image: redis
    container_name: ownphotos-redis

volumes:
  ownphotos_data:

LoSz avatar Jun 18 '19 15:06 LoSz

i came to the conclusion that the issue is the /nfs i changed the /data path to a local directory on the host and it worked. tried to add PIUD & GUID 1000 to the backend and frontend but it didn't work

i'm using rancheros in a proxmox vm and my pictures are on a wd my cloud mirror gen2 nas drive the mount on rancheros is a bit strange for my tase. going to try a normal debian vm and report back

LoSz avatar Jun 19 '19 20:06 LoSz

There is definitely a problem with accessing network shares, both NFS and cifs. Both didn't work for me, but as soon as I copied some photos to the local disk, it worked.

Nozzie avatar Jun 04 '20 13:06 Nozzie

I found a workaround. First put some photos in the dir where you want to mount the NFS share. Start the containers, and you should be able to add the scan dirictory on the admin page. Stop the app, mount the NFS share, start the app, and you should be able to scan the share since it is now added.

This worked for me.

Nozzie avatar Jun 04 '20 18:06 Nozzie

I have the same issue with CIFS, I dont know if this is the optimal method but it worked for me. First i mounted my share to a local folder and then i created a bind mount from the shared folder to the data ownphotos folder and it recognised it just fine.

giorgotsaousi avatar Feb 09 '21 12:02 giorgotsaousi

Hey, ownphotos is no longer maintained. Here is a fork of ownphotos that is maintained: https://github.com/LibrePhotos/librephotos If your issue still persists, please open a new issue in the librephotos repository.

derneuere avatar Feb 09 '21 15:02 derneuere