-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker container with koel behind nginx reverse proxy in non-root #116
Comments
Please report in the right repo. Transferred for you. |
@phanan thanks for the transfer, didn't know one can do that, neat feature :). @INNKCake From what I can gather, it looks like you should be using |
I apparently got it to work with a similar setup now, did you get this fixed @INNKCake ? |
Nginx config: server {
listen 80;
listen [::]:80;
server_name koel.example;
location / { return 301 https://$host$request_uri; }
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name koel.example;
ssl_certificate /etc/letsencrypt/live/koel.example/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/koel.example/privkey.pem;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:1380/;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
}
} docker-compose.mysql.yml version: '3'
services:
koel:
image: hyzual/koel
depends_on:
- database
ports:
- 1380:80
environment:
- DB_CONNECTION=mysql
- DB_HOST=database
- DB_USERNAME=koel
- DB_PASSWORD=PASS
- DB_DATABASE=koel
volumes:
- /srv/funkwhale/data/music:/music
- covers:/var/www/html/public/img/covers
- search_index:/var/www/html/storage/search-indexes
- ./koel.env:/var/www/html/.env
database:
image: mysql/mysql-server:5.7
volumes:
- db:/var/lib/mysql
environment:
MYSQL_DATABASE: koel
MYSQL_USER: koel
MYSQL_PASSWORD: PASS
MYSQL_ROOT_PASSWORD: PASS
volumes:
db:
driver: local
music:
driver: local
covers:
driver: local
search_index:
driver: local koel.env APP_URL=https://koel.example
FORCE_HTTPS=true Note that I am using the music collection from Funkwhale as that is what I tried before and am now using Ampache as I realized that its feature-richness far surpasses the modern interface of Koel for my case. But all three are still running perfectly well :) I actually initially had a blank response due to a misconfigured DNS entry 🤦♂️ and then I had forgotten to run the initialization. |
I'd also prefer to reverse proxy koel, so certs & such are handled by caddy like everything else on my system. However, I can't even seem to figure out how I'm supposed to set the domain name/cert or even serve koel in any capacity. After successfully installing, I tried also, what is koel.env and Docker-compose.env, I don't have those in the dir from the official release. |
Oh my god this needs to be placed or at least linked to chronologically i read this so many times and skipped it every time because i thought it was for manual installs only https://github.com/koel/docker#useful-environment-variables |
Description
I freshly installed Koel using the recommended Docker image and configured it to work under the Nginx reverse proxy in subfolder
/koel
. The page loads, but the most of the content is missing, and the links to the content are broken (https://example.com/img/icon.png
instead ofhttps://example.com/koel/img/icon.png
). I tried to provide .env to container with bothAPP_URL
andFORCE_HTTPS
, but no luck - page still blank. It feels that variables are not passed properly for some reason.If I revert my current Nginx config to use
/
- everything works fine.Nginx confix
Docker-compose.yml
koel.env
Docker-compose.env
Environment
The text was updated successfully, but these errors were encountered: