LibrePhotos / librephotos

A self-hosted open source photo management service. This is the repository of the backend.
MIT License
7.01k stars 309 forks source link

Choose a directory from below not working in /admin #49

Closed meyerdominik closed 3 years ago

meyerdominik commented 3 years ago

I can't get any response from /api/dirtree/ when i am opening /admin... The request is always canceled!

Screenshot

Also the api/user/ request just sometimes succeeds.

My docker-compose.yml:

version: '2.1' services: proxy: image: reallibrephotos/librephotos-proxy:dev tty: true container_name: librephotos-proxy restart: always links:

  • "backend:backend"
  • "frontend:frontend" ports:
  • "80:80" librephotos-db: image: postgres container_name: librephotos-db restart: always environment:

    This db password is internal, you can change it if you want, but also change it in librephotos-backend container

  • POSTGRES_USER=docker
  • POSTGRES_PASSWORD=AaAa1234
  • POSTGRES_DB=ownphotos volumes:
  • $HOME/librephotos_data:/var/lib/postgresql/data command: postgres -c fsync=off -c synchronous_commit=off -c full_page_writes=off -c random_page_cost=1.0 healthcheck: test: ["CMD-SHELL", "pg_isready -d ownphotos -U docker"] interval: 5s timeout: 5s retries: 5 frontend: image: reallibrephotos/librephotos-frontend:dev

    For development uncomment the "build" line below and comment the "image" line above

    build: ../librephotos-frontend

    container_name: librephotos-frontend restart: always tty: true links:

  • "backend:backend" backend: image: reallibrephotos/librephotos:dev

    For development uncomment the "build" line below and comment the "image" line above

    build: .

    container_name: librephotos-backend restart: always volumes:

  • F://Google_Drive:/data # CHANGE ME
  • E://librephotos/storage/protected_media:/code/protected_media # CHANGE ME
  • E://librephotos/storage/logs:/code/logs # CHANGE ME
  • E://librephotos/storage/cache:/root/.cache # CHANGE ME environment:
  • SECRET_KEY=

    This is backend host from within the service, you dont need to change this

  • BACKEND_HOST=backend
  • ADMIN_EMAIL=
  • ADMIN_USERNAME=meyerdominik

    Change your admin password!

  • ADMIN_PASSWORD=
  • DEBUG=false
  • DB_BACKEND=postgresql
  • DB_NAME=ownphotos
  • DB_USER=docker

    This db password is internal, you can change it if you want, but also change it in librephotos-db container

  • DB_PASS=AaAa1234
  • DB_HOST=librephotos-db
  • DB_PORT=5432
  • REDIS_HOST=librephotos-redis
  • REDIS_PORT=6379

    https://account.mapbox.com/auth/signup/

    MAPBOX_API_KEY= # CHANGE ME - You need this for reverse photo geocoding

    https://docs.djangoproject.com/en/3.1/ref/settings/#std:setting-TIME_ZONE

  • TIME_ZONE=Europe/Berlin

    The number of Gunicorn worker processes; SET to (2cpu cores); "NOT (2cpu threads)"

  • WEB_CONCURRENCY=4 # CHANGEME

    Gunicorn worker timeout seconds (ensure that one bad request doesn't stall other requests forever)

  • WORKER_TIMEOUT=1800 links:
  • "librephotos-db:librephotos-db"
  • "librephotos-redis:librephotos-redis"

    Wait for Postgres

    depends_on: librephotos-db: condition: service_healthy librephotos-redis: image: redis container_name: librephotos-redis restart: always volumes: librephotos-data: media:

meyerdominik commented 3 years ago

I just had to restart the containers :/ 👍

Works now :)