LycheeOrg / Lychee-Docker

Docker image for Lychee
https://lycheeorg.github.io/
167 stars 55 forks source link

Running on subpath with nginx #181

Closed azertylr closed 9 months ago

azertylr commented 9 months ago

Hello I've tried to run as a subpath using nginx but I doesn't work, it redirect without the supath :(

This is my docker-compose:

  lychee:
    image: lycheeorg/lychee
    container_name: lychee
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
      - DB_CONNECTION=sqlite
      - DB_DATABASE=/conf/db.sqlite
      - APP_NAME=Lychee 
      - APP_URL='https://domain.tld:443'
      - APP_DIR='/lychee'
      - TRUSTED_PROXIES=swag

and nginx config

location /lychee/ {
    include /config/nginx/proxy.conf;
    include /config/nginx/resolver.conf;
    set $upstream_app lychee;
    set $upstream_port 80;
    set $upstream_proto http;
    proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    rewrite /lychee(.*) $1 break;
}

thanks
d7415 commented 9 months ago

Sorry - APP_DIR was not being passed on. This should be fixed in the next :dev and release builds. In the meantime, you could add it manually to /conf/.env in the container.