immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
45.19k stars 2.19k forks source link

[BUG] Unable to access web #5121

Closed ShiftyMcCool closed 10 months ago

ShiftyMcCool commented 10 months ago

The bug

Getting {"message":"Cannot GET /","error":"Not Found","statusCode":404} when accessing web.

Just upgraded to 1.87.0 and made the appropriate modifications to the docker-compose.yml file minus the namespace. Now, the android app seems fine but the web page is no longer being served. When looking at the logs, I don't see any web routes being set up in Nest, just server routes (unless I'm missing something).

Is there a new route to access the web interface? If I plug the server routes into the browser, I seem to get valid responses so the server is functioning, just the web interface is missing.

The OS that Immich Server is running on

Distributor ID: Debian Description: Debian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm

Version of Immich Server

v1.87.0

Version of Immich Mobile App

v1.87.0

Platform with the issue

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
      - typesense
    restart: always
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.immich-http.rule=Host(`immich.mistborn`)"
      - "traefik.http.routers.immich-http.entrypoints=web"
      - "traefik.http.routers.immich-http.middlewares=mistborn_auth@file"
      - "traefik.http.routers.immich-https.rule=Host(`immich.mistborn`)"
      - "traefik.http.routers.immich-https.entrypoints=websecure"
      - "traefik.http.routers.immich-https.middlewares=mistborn_auth@file"
      - "traefik.http.routers.immich-https.tls.certresolver=basic"
      - "traefik.http.services.immich-service.loadbalancer.server.port=3001"

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - tsdata:/data
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - ${UPLOAD_LOCATION}/postgres:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:
  tsdata:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=some-random-text
DB_PASSWORD=postgres

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. `docker compose up -d` and wait for completion
2. go to web address, in my case `http(s)://immich.mistborn` or `http://192.168.50.180:2283`
3. view error on page:  `{"message":"Cannot GET /","error":"Not Found","statusCode":404}`
4. happens on any web route: `/auth/login`, `/photos`, `/admin/user-management`, etc...
...

Additional information

I'm a web/NestJS developer as well, feel free to get as technical with your requests as necessary to troubleshoot the issue.

NOTE: Including the Traefik labels in my docker-compose.yml for completeness and transparency, but I seem to have the same issue without it

schuhbacca commented 10 months ago

The changes are coming in the next release, this one is just a warning for the compose changes

ShiftyMcCool commented 10 months ago

🤦 @schuhbacca Oh man, I didn't even notice... sorry and thanks!