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

Can't start docker setup even with minmal configuration #124

Open
dukobpa3 opened this issue Oct 26, 2024 · 13 comments
Open

Can't start docker setup even with minmal configuration #124

dukobpa3 opened this issue Oct 26, 2024 · 13 comments

Comments

@dukobpa3
Copy link

Describe the bug
Trying to setup server but something going wrong

photofield 0.16.0
config path data/configuration.yaml
geo using file:data/geo/geoBoundariesCGAZ_ADM2_s5_twkb_p3.gpkg?vfs=vfs1&mode=ro
cache database version 15, migrating if needed
ffmpeg found at /usr/bin/ffmpeg
thumbs database version 1, migrating if needed
extensions .jpg, .jpeg, .png, .avif, .bmp, .pam, .ppm, .jxl, .exr, .cr2, .dng, .mp4
3 collections
  timeline - 0 files indexed N/A ago
  inbox - 0 files indexed N/A ago
  albums - 0 files indexed N/A ago
app running (api under /api)
  local    http://127.0.0.1:8080
  network  http://172.21.0.2:8080
  local    http://[::1]:8080
scene loading timeline
get prefix ids           0 ms
list infos get dirs      0 ms
list infos dirs 0
list infos               0 ms
list infos sqlite        0 ms
panic: sqlite: prepare "\n\t\t\tSELECT * FROM (\n\t\t\n\t\t\t)\n\t\t\tORDER BY created_at_unix ASC\n\t\t\t;": SQL logic error: near ")": syntax error
goroutine 289 [running]:
zombiezen.com/go/sqlite.(*Conn).Prep(0xc0003a6410, {0xc0003a3380, 0x40})
	/home/runner/go/pkg/mod/zombiezen.com/go/[email protected]/sqlite.go:419 +0x129
photofield/internal/image.(*Database).listWithPrefixIds.func1()
	/home/runner/work/photofield/photofield/internal/image/database.go:1932 +0x7a5
created by photofield/internal/image.(*Database).listWithPrefixIds in goroutine 218
	/home/runner/work/photofield/photofield/internal/image/database.go:1783 +0x25a

To Reproduce
I'm not sure because it is first setup

There is remote folders connected by NFS
Nothing special except that

Config:

# Defines collections / albums that are scanned and shown in the UI
collections:
  # By default show all subdirs of the current working directory
  - expand_subdirs: true
    expand_sort: desc
    dirs: 
      - "/photo"

Compose.yml

services:
  photofield:
    image: ghcr.io/smilyorg/photofield:latest
    container_name: photofield
    ports:
      - 8080:8080
    user: 1000:1000
    volumes:
      - ./data:/app/data
      - /mnt/unraid/photo/_backup/albums:/photo/albums:ro
      - /mnt/unraid/photo/_backup/inbox:/photo/inbox:ro
      - /mnt/unraid/photo/_backup/timeline:/photo/timeline:ro
      #- /volume1/homes/ExampleUser/Drive/Moments:/exampleuser:ro

  photofield-ai:
    image: ghcr.io/smilyorg/photofield-ai:latest
    container_name: photofield-ai
    ports:
      - 8081:8081
    user: 1000:1000

Expected behavior
It runs :)

Additional context
It is an LXC inside Proxmox, mybe there is different FS acces or whatever. But any other apps runs well the same way

@SmilyOrg
Copy link
Owner

Hey there! Thanks for trying it out.

This looks like it might be the bug that made it crash on empty collections in 0.16.

I released 0.17 today that should have a fix for it, could you try that?

@dukobpa3
Copy link
Author

should I do something special to strat indexing? Not crashing anymore but empty collections

@SmilyOrg
Copy link
Owner

Try clicking on the collection and pressing Rescan. If it doesn't work, please paste the logs, they might reveal something 🤔

@dukobpa3
Copy link
Author

Nothing

3 collections 
  timeline - 0 files indexed N/A ago 
  inbox - 0 files indexed N/A ago 
  albums - 0 files indexed N/A ago 
app running (api under /api) 
  local    http://127.0.0.1:8080 
  network  http://172.21.0.2:8080 
  local    http://[::1]:8080 
scene loading timeline 
get prefix ids           0 ms 
list infos get dirs      0 ms 
list infos dirs 0 
list infos               0 ms 
layout placing           0 ms 
layout events 0 
scene load timeline      0 ms 
photos 0, scene 1792 x 84 
Unable to get path from image id not found 0 
Unable to get path from image id not found 0 
scene loading albums 
get prefix ids           0 ms 
list infos get dirs      0 ms 
list infos dirs 0 
list infos               0 ms 
layout placing           0 ms 
layout events 0 
scene load albums        0 ms 
photos 0, scene 1792 x 84 
scene loading timeline 
get prefix ids           0 ms 
list infos get dirs      0 ms 
list infos dirs 0 
list infos               0 ms 
layout placing           0 ms 
layout events 0 
scene load timeline      0 ms 
photos 0, scene 375 x 84 
scene loading inbox 
get prefix ids           0 ms 
list infos get dirs      0 ms 
list infos dirs 0 
list infos               0 ms 
layout placing           0 ms 
layout events 0 
scene load inbox         0 ms 
photos 0, scene 375 x 84 
indexing files inbox 
indexing files inbox dir /photo/inbox/ 
index /photo/inbox/     28 ms 
list id paths sqlite     0 ms 
list missing sqlite      0 ms 
list missing sqlite      0 ms 
database optimizing 
database optimize        9 ms 
scene loading inbox 
get prefix ids           1 ms 
list infos get dirs      1 ms 
list infos dirs 0 
list infos               1 ms 
layout placing           0 ms 
layout events 0 
scene load inbox         1 ms 
photos 0, scene 375 x 84 
indexing files inbox 
indexing files inbox dir /photo/inbox/ 
index /photo/inbox/      0 ms 
list id paths sqlite     0 ms 
list missing sqlite      0 ms 
list missing sqlite      0 ms 
scene loading timeline 
get prefix ids           1 ms 
list infos get dirs      1 ms 
list infos dirs 0 
list infos               1 ms 
layout placing           0 ms 
layout events 0 
scene load timeline      1 ms 
photos 0, scene 1792 x 84 
list missing sqlite      1 ms 
scene loading timeline 
get prefix ids           2 ms
list infos get dirs      2 ms
list infos dirs 0
list infos               2 ms
layout placing           0 ms
layout events 0
scene load timeline      2 ms
photos 0, scene 1792 x 84
scene loading timeline
get prefix ids           2 ms
list infos get dirs      2 ms
list infos dirs 0
list infos               2 ms
layout placing           0 ms
layout events 0
scene load timeline      2 ms
photos 0, scene 1792 x 84
list missing sqlite      2 ms 

@SmilyOrg
Copy link
Owner

Hmm, interesting. What if you do something like this, does it print any files?

docker compose run --rm --entrypoint sh photofield -c 'tree /photo/inbox/'

@SmilyOrg
Copy link
Owner

or ls -la /photo/inbox/ instead of tree /photo/inbox/

@dukobpa3
Copy link
Author

looks like everything ok with it
Screenshot 2024-10-29 at 09 05 46

@SmilyOrg
Copy link
Owner

Ah! Maybe it's because the extension is filtered out by default?

Try overriding extensions in your config to include .mts, here are the defaults:

extensions: [

It doesn't transcode video yet, so if your browser doesn't support mts natively, it won't play though

@dukobpa3
Copy link
Author

There is 3 folders added. There is a lot of different types. I've made screen just for demonstration that folders is visible for container.

Should I add extensions to "my minimal config"?

@dukobpa3
Copy link
Author

Ok i've took the bigger config as example – defaults with my folders
looks like something indexed now

@dukobpa3
Copy link
Author

Ok works now with default config. Thx )

@SmilyOrg
Copy link
Owner

Great to hear! What ended up being the issue? Perhaps the setup could be improved to avoid it in the future :)

@dukobpa3
Copy link
Author

update the docs about this extensions list

There is "minimal config example" with just folders but as result it is not enough. As I understand at least extensions list needed, maybe something else.

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

2 participants