Open INNKCake opened 2 years ago
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 APP_URL
var like you said you used. By any chance, does it make a difference if you provide APP_URL
through the environment
section in Docker-compose.yml
?
Also, koel uses a lot of caching, does it help if you run php artisan cache:clear
in the koel container ? I'm thinking that maybe the paths to the assets is somehow cached and it would still give you the default despite APP_URL
having changed.
@phanan thank you for the transfer.
@Hyzual I'll try your suggestions.
I apparently got it to work with a similar setup now, did you get this fixed @INNKCake ?
I apparently got it to work with a similar setup now, did you get this fixed @INNKCake ?
@xeruf Sadly, no. Same problems. Tried a coulpe of times and desided to leave it for now. Can you share your koel/nginx configuration that works? Would be great!
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 :man_facepalming: 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 php artisan serve
, but reverse-proxying localhost:8000 (which is where it said the server was being served), does nothing. I'd assume this is because it's on that port inside of the docker container, but there doesn't appear to be any mention of how else you're supposed to serve it.
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
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