Leantime / docker-leantime

Official Docker Image for Leantime https://leantime.io
GNU Affero General Public License v3.0
190 stars 86 forks source link

Webpage not rendering correctly behind revers proxy #41

Closed fusrohdan closed 2 years ago

fusrohdan commented 2 years ago

Hi,

I recently set up the Leantime docker container on my docker host. I have a weird issue where if I connect locally via HTTP to the Leantime web portal, everything renders correctly. But if I connect externally through my Nginx Reverse Proxy Manager container, the web page renders completely incorrectly. This is the same whether I connect through the proxy on the local network or over the internet.

Here is a how everything is configured: Firewall (192.168.0.1) No VLANs, port 80 and 443 point to the NGINX reverse proxy manager Docker host (192.168.0.70) running both nginx revp manager and leantime containers External dns entry pointing to Leantime container. Verified as working as the Leantime page loads, albeit incorrectly. Leantime container running on port 82 on host, redirecting to 80 in container

Here is the config taken from portainer:

LEAN_DB_HOST | mysql_leantime LEAN_DB_USER | admin LEAN_DB_PASSWORD | LEAN_DB_DATABASE | leantime PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PHPIZE_DEPS | autoconf dpkg-dev dpkg file g++ gcc libc-dev make pkgconf re2c PHP_INI_DIR | /usr/local/etc/php PHP_EXTRA_CONFIGURE_ARGS | --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi PHP_CFLAGS | -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PHP_CPPFLAGS | -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 PHP_LDFLAGS | -Wl,-O1 -pie GPG_KEYS | 1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F PHP_VERSION | 7.2.34 PHP_URL | https://www.php.net/distributions/php-7.2.34.tar.xz PHP_ASC_URL | https://www.php.net/distributions/php-7.2.34.tar.xz.asc PHP_SHA256 | 409e11bc6a2c18707dfc44bc61c820ddfd81e17481470f3405ee7822d8379903

I will attach some screenshots now Connecting to the internal hostname from a laptop on the same subnet image image

Connecting from the exact same device, browser and network using the external DNS name image

image

Thanks in advance for any help. If you need additional info let me know :)

fusrohdan commented 2 years ago

Solved by adding the following to my docker compose

LEAN_APP_URL: {yourdomain}

LEAN_APP_URL: 'https://leantime.revpdnsname.com'