Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    metril
    @metril
    Is it possible to have multiple libraries in Photonix?
    Per the documentation, it looks like I can have multiple libraries, but nothing about how I can create them.
    Jules Bertholet
    @Jules-Bertholet
    @metril It's possible, but they have to be created via command line
    # Launch Python shell in the running Docker container
    docker exec -ti photonix python photonix/manage.py shell
    
    # Import Django models
    from photonix.accounts.models import User
    from photonix.photos.models import Library, LibraryUser, LibraryPath
    
    # Create a user
    user = User(username='YOUR_USERNAME')
    user.set_password('YOUR_PASSWORD')
    user.save()
    
    # Create a library
    library = Library(name='YOUR_NEW_LIBRARY_NAME', classification_color_enabled=True, classification_location_enabled=True, classification_style_enabled=True, classification_object_enabled=True, setup_stage_completed='Th')
    library.save()
    
    # Create a path attached to the library so files can be imported
    library_path = LibraryPath(library=library, type='St', backend_type='Lo', path='YOUR_PATH_INSIDE_DOCKER_CONTAINER', watch_for_changes=True)
    library_path.save()
    
    # Link the user created above to the library created above
    library_user = LibraryUser(library=library, user=user, owner=True)  # owner=True only if this new library user is going to be in charge of managing it
    library_user.save()
    
    # Alternatively, if you want to be the owner in charge, set owner=False above and then also run this
    owner_user = User.objects.get(username='demo')
    library_user = LibraryUser(library=library, user=owner_user, owner=True)
    library_user.save()
    metril
    @metril
    Thank you
    I started scrolling up and then I found the syntax. Much appreciated!
    ScuttleSE
    @ScuttleSE
    hm...evaluating a bunch of different self-hosted image "libraries"...and I'm looking at photonix, but can't really make heads or tails of it...when I look at the live demo there doesn't seem to be a way to have an Album of pictures
    is that true?
    Damian Moore
    @damianmoore
    Hi @ScuttleSE, thanks for getting in touch. You're right, we don't have an albums feature right now. We've been primarily focussed on tagging as a way of organising but have decided we will add albums soon (some people like that there currently aren't albums). The main idea behind Photonix has been that the user shouldn't have to spend time organising their photos to be able to find what they are looking for. Hope this helps.
    Damian Moore
    @damianmoore
    We got our first review (that I know of) on a podcast: https://linuxunplugged.com/409 . Not the most flattering review but nothing we can't improve on. Good to be the first solution mentioned and it means we're doing well at getting the word out. Segment starts at 23mins, Photonix is at 42mins.
    We'll be looking at getting a designer/UX engineer soon to tidy things up.
    Damian Moore
    @damianmoore
    Thanks for posting @Jules-Bertholet. We're getting good traffic from that article today. On a related note, our latest blog post details that we do actually have face recognition now: https://photonix.org/blog/may-2021-roundup/
    Jules Bertholet
    @Jules-Bertholet
    Yes, I noticed that little error in the article
    Damian Moore
    @damianmoore
    Would have been nice to have timed it better but oh well.
    zutart
    @zutart:mysmatrix.zutart.xyz
    [m]

    Afternoon everyone! Bit stumped so I'm hoping you all can help me out. Just tried launching Photonix for the first time in my stack and while it appears everything is set up properly per the documentation, I cannot get logged in at all. Every time I try to authenticate with the credentials I set up through the python script, it just hands at Loading... and never goes anywhere. Logs just show the same thing over and over

    today at 1:45:51 PM {GatewayIP} - - [23/Jun/2021:17:45:51 +0000] "POST /graphql HTTP/1.1" 400 154 "https://{domain}/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"

    i'm running this behind traefikv2 in case that matters at all
    thanks in advanced to anyone who may be able to assist!
    Damian Moore
    @damianmoore
    Hi @zutart:mysmatrix.zutart.xyz, thanks for getting in touch. Did you create your username/password and library via the onboarding screens (in the browser)? There are some commands here https://photonix.org/docs/users_libraries/ but they will only create non-admin users.
    zutart
    @zutart:mysmatrix.zutart.xyz
    [m]
    hey @damianmoore - i actually never get that screen. i've tried launching both with the admin credentials in the docker compose file as well as leaving that blank (and hoping to see the initial prompts you're referring to). both times i get a login screen and then it hangs
    Damian Moore
    @damianmoore
    That's weird. You're not running with the environment variable DEMO=1 are you?
    zutart
    @zutart:mysmatrix.zutart.xyz
    [m]
    nope, here's what I have in the compose file
    photonix:
        image: photonixapp/photonix:0.11.0
        container_name: photonix
        restart: unless-stopped
        depends_on:
          - traefik
          - redis_photonix
          - postgres
        security_opt:
          - no-new-privileges:true
        networks:
          xinstitute:
          socket_proxy:
        environment:
          - ENV=prd
          - POSTGRES_HOST=postgres
          - POSTGRES_USER=photonix
          - POSTGRES_PASSWORD={redacted}
          - REDIS_HOST=redis_photonix
          - ALLOWED_HOSTS='*'
        volumes:
          - $DOCKERDIR/photonix/photos:/data/photos
          - $DOCKERDIR/photonix/raw-photos-processed:/data/raw-photos-processed
          - $DOCKERDIR/photonix/cache:/data/cache
          - $DOCKERDIR/photonix/models:/data/models
        labels:
          - "traefik.enable=true"
          ## HTTP Routers
          - "traefik.http.routers.photonix-rtr.entrypoints=https"
          - "traefik.http.routers.photonix-rtr.rule=Host(`mysphotonix.$DOMAINNAME`)"
          ## Middlewares
          - "traefik.http.routers.photonix-rtr.middlewares=chain-no-auth@file"
          ## HTTP Services
          - "traefik.http.routers.photonix-rtr.service=photonix-svc"
          - "traefik.http.services.photonix-svc.loadbalancer.server.port=80"
    Damian Moore
    @damianmoore
    Can't see anything wrong with that.
    zutart
    @zutart:mysmatrix.zutart.xyz
    [m]
    dang, hoping it was that easy unfortunately
    Damian Moore
    @damianmoore
    Could you try running docker-compose exec photonix ./manage.py migrate to confirm DB is connected and migrations run?
    zutart
    @zutart:mysmatrix.zutart.xyz
    [m]
    sure one second
    seems ok to me
    Operations to perform:
      Apply all migrations: accounts, admin, auth, contenttypes, photos, refresh_token, sessions
    Running migrations:
      No migrations to apply.
    Damian Moore
    @damianmoore
    Yeah looks fine
    :(
    zutart
    @zutart:mysmatrix.zutart.xyz
    [m]
    lol yeah i agree
    Damian Moore
    @damianmoore
    I know it's annoying but could I suggest you try running the whole example docker-compose file (maybe in a VM) first to confirm that works? https://raw.githubusercontent.com/photonixapp/photonix/master/docker/docker-compose.example.yml
    zutart
    @zutart:mysmatrix.zutart.xyz
    [m]
    yeah i'll give that a go in a bit, i have a RP4 lying around somewhere i could use as a dev box
    i'm also going to try and blow away all of the backend pieces and start again from scratch to see if that does anything
    you recommend me putting the admin credentials in the compose file or leave them out to see if i can get to the initial setup screen?
    Damian Moore
    @damianmoore
    Cool.
    I'd say leave out the admin creds to make sure the onboarding screens come up.
    zutart
    @zutart:mysmatrix.zutart.xyz
    [m]
    perfect
    really appreciate you taking the time, i'll ping you with results either way!
    Damian Moore
    @damianmoore
    No problem. Sorry it didn't work first time. I'd be really interested to know if you figure out what the problem was you I can add it to the docs if helpful.
    Good luck!
    zutart
    @zutart:mysmatrix.zutart.xyz
    [m]
    absolutely, will make sure to let you know and put up a PR if i can figure out what's up and can update the docs for you accordingly. seems really weird honestly because im going through the logs in dozzle and can't see a single thing that's failing clearly besides that 400 response from the POST request
    and don't feel the need to apologize, you're the one donating time and effort to some stranger so that i can maybe pull my wife away from GCloud so i really appreciate it!
    Damian Moore
    @damianmoore
    Haha. Thanks. Our logging could be improved but hopefully that's not the issue.
    zutart
    @zutart:mysmatrix.zutart.xyz
    [m]
    agreed

    actually this is the only other thing i could find that failed

    today at 2:57:22 PM WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard installation.
    today at 2:57:22 PM WARNING:root:Limited tf.summary API due to missing TensorBoard installation.

    this a problem that may result in what i'm seeing?

    zutart
    @zutart:mysmatrix.zutart.xyz
    [m]
    oh crap and i forgot to mention, i'm behind cloudflare's DNS
    zutart
    @zutart:mysmatrix.zutart.xyz
    [m]

    ok, so i got rid of everything and started from scratch. saved the initial log file before i tried to load up at all so i have a copy of that initial log to share. as soon as i went to the website to try and load up for the initial, i'm met with the login screen and that same error starts to fly into the log over and over

    today at 3:32:04 PM {GW IP} - - [23/Jun/2021:19:32:04 +0000] "POST /graphql HTTP/1.1" 400 154 "https://{domain}/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"

    so it looks like it's having a problem as soon as I try to load up for some reason. i also took out all of the middlewares for traefik just to make sure there wasn't some issue i was missing from that perspective on routing but that didn't have any effect. i'll let you know how the stock run on the RPi4 goes, i apparently now have to fight with my orbi routers as the firmware they're on is borked and i cant keep them from randomly restarting throughout the day

    wahoo!
    zutart
    @zutart:mysmatrix.zutart.xyz
    [m]
    morning @damianmoore - went ahead and ran the instructions on the RPi4 and it worked as anticipated (forwarded to the onboarding page) - it loaded up the same login screen i normally see but eventually routed over to the right spot. Got me thinking - is there an issue with that redirection when i'm coming in from a reverse proxy url as opposed to the direct ip address? im running my normal stack off of a headless server so i've been coming in that way instead of doing the localhost approach i just took