gregoryseibert / funkwhale-docker-traefik Goto Github PK
View Code? Open in Web Editor NEWA collection of files for a funkwhale setup with docker and traefik reverse proxy (currently unmaintained and not up-to-date)
A collection of files for a funkwhale setup with docker and traefik reverse proxy (currently unmaintained and not up-to-date)
i followed instructions, edited the files accordingly to my setup and i can log in into funkwhale. As soon as i log in the https stops working and went to the http (browser complaining not secure web site).
How to fix this? I am using docker and traefik latest versions. please help. thanks.
Not an issue really, but what are the installation commanda once I git clone your repository and amend and edit the 4 files mentioned in the readme?
Hello thanks for helping me doing my funkwhale setup, but i'm encountering several error in the front console and in the back with the websockets.
I'm kinda new to that bu any help would be great !
Edit : Okay the error are only for Chrome, working for Firefox
Front errors :
index.js:126 WebSocket connection to 'wss://s.sel.ovh/api/v1/activity?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNTQxNjQ0NTc1LCJlbWFpbCI6ImFAdC5jbyIsIm9yaWdfaWF0IjoxNTQxMDM1NjU4fQ.XTvABT16OafKpkGFk9_978RvdStBS1MfrMi1d7APA4w' failed: WebSocket is closed before the connection is established. (anonymous) @ index.js:126 setTimeout (async) C @ index.js:124 setTimeout (async) A @ index.js:113
5index.js:123 WebSocket connection to 'wss://s.sel.ovh/api/v1/activity?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNTQxNjQ0NTc1LCJlbWFpbCI6ImFAdC5jbyIsIm9yaWdfaWF0IjoxNTQxMDM1NjU4fQ.XTvABT16OafKpkGFk9_978RvdStBS1MfrMi1d7APA4w' failed: Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received
Back errors :
funkwhale-api | 172.26.0.7:48228 - - [01/Nov/2018:02:43:00] "WSCONNECTING /api/v1/activity" - - funkwhale-api | 172.26.0.7:48228 - - [01/Nov/2018:02:43:00] "WSCONNECT /api/v1/activity" - - funkwhale-frontend | 172.23.0.6 - - [01/Nov/2018:02:43:00 +0000] "GET /api/v1/activity?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNTQxNjQ0NTc5LCJlbWFpbCI6ImFAdC5jbyIsIm9yaWdfaWF0IjoxNTQxMDM1NjU4fQ._J9nY1wctgQ_WKGW_qZQPu7ihPIyDDHR9nElfEEyMQ4 HTTP/1.1" 101 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36" funkwhale-api | 172.26.0.7:48228 - - [01/Nov/2018:02:43:00] "WSDISCONNECT /api/v1/activity" - -
Il also notice that even using it with a lets encrypt widcard certificate i still have error of image not being in HTTPS thus leading my site to be not full secured for Chrome
vue-lazyload.js:6 Mixed Content: The page at 'https://s.sel.ovh/library/albums/1' was loaded over HTTPS, but requested an insecure image 'http://s.sel.ovh/media/__sized__/albums/covers/2018/11/01/b489a9261-c70f-4243-9e3a-602ec0ad276d-crop-c0-5__0-5-50x50-70.jpg'. This content should also be served over HTTPS.
But the issue is the same on the offial demo site.
Cheers !
Thanks for sharing your setup. It's gotten me really close to having everything working.
I have a Traefik container already setup, so I'm trying to integrate Funkwhale with that. I can deploy all the containers and they spin up with no errors, but when I go to actually load the login page for Funkwhale I'm hit with a Gateway Timeout
. (The Let's Encrypt certificate is being setup though. I can view the certificate for the page (it's loading in HTTPS) and it's correct for my URL.)
My Traefik container is working for all my other deployed containers, so all I can figure is something between NGINX and Traefik isn't playing nice.
I've included the relevant config files below; please let me know if you need any others from me.
funkwhale - docker-compose.yml
version: '3'
services:
postgres:
restart: unless-stopped
env_file: .env
image: postgres:9.4
volumes:
- ./data/postgres:/var/lib/postgresql/data
redis:
restart: unless-stopped
env_file: .env
image: redis:3
volumes:
- ./data/redis:/data
celeryworker:
restart: unless-stopped
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
env_file: .env
command: celery -A funkwhale_api.taskapp worker -l INFO
links:
- postgres
- redis
environment:
- C_FORCE_ROOT=true
volumes:
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funkwhale/data/music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
- "${MEDIA_ROOT}:${MEDIA_ROOT}"
celerybeat:
restart: unless-stopped
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
env_file: .env
command: celery -A funkwhale_api.taskapp beat -l INFO
links:
- postgres
- redis
api:
restart: unless-stopped
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
env_file: .env
container_name: funkwhale-api
volumes:
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funkwhale/data/music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
- "${MEDIA_ROOT}:${MEDIA_ROOT}"
- "${STATIC_ROOT}:${STATIC_ROOT}"
- ./front/dist:/frontend
ports:
- "${FUNKWHALE_API_IP:-127.0.0.1}:${FUNKWHALE_API_PORT:-5000}:5000"
links:
- postgres
- redis
frontend:
image: nginx:1.15.2-alpine
restart: always
privileged: true
container_name: funkwhale-frontend
volumes:
- ./html:/var/www/html
- ./custom:/srv/funkwhale/custom
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf
- ./data/media:/srv/funkwhale/data/media
- ./data/static:/srv/funkwhale/data/static
- ./data/music:/srv/funkwhale/data/music:ro
labels:
- "traefik.enable=true"
- "traefik.backend=funkwhale.domain.com"
- "traefik.frontend.rule=Host:funkwhale.domain.com"
- "traefik.docker.network=proxy"
- "traefik.port=80"
ports:
- 8881:80
expose:
- "8080"
funkwhale - nginx.conf
user root;
events {
worker_connections 1024; # increase if you have lots of clients
accept_mutex off; # "on" if nginx worker_processes > 1
}
http {
include mime.types;
# fallback in case we can't determine a type
default_type application/octet-stream;
sendfile on;
# Update this with the IP to your funkwhale API...
upstream funkwhale-api {
server funkwhale_api_1:5000;
}
# required for websocket support
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80 default_server;
root /var/www/html;
server_name funkwhale.domain.com;
location = / {
return 301 /library;
}
location / {
sub_filter '</head>' '<link href=/custom/custom.css rel=stylesheet></head>';
sub_filter_once on;
try_files $uri $uri/ @rewrites;
}
location @rewrites {
rewrite ^(.+)$ /index.html last;
}
location /api/ {
include /etc/nginx/funkwhale_proxy.conf;
# this is needed if you have file import via upload enabled
client_max_body_size 30M;
proxy_pass http://funkwhale-api/api/;
}
location /federation/ {
include /etc/nginx/funkwhale_proxy.conf;
proxy_pass http://funkwhale-api/federation/;
}
# You can comment this if you do not plan to use the Subsonic API
location /rest/ {
include /etc/nginx/funkwhale_proxy.conf;
proxy_pass http://funkwhale-api/api/subsonic/rest/;
}
location /.well-known/ {
include /etc/nginx/funkwhale_proxy.conf;
proxy_pass http://funkwhale-api/.well-known/;
}
location /media/ {
alias /srv/funkwhale/data/media/;
}
location /_protected/media {
# this is an internal location that is used to serve
# audio files once correct permission / authentication
# has been checked on API side
internal;
alias /srv/funkwhale/data/media;
}
location /_protected/music {
# this is an internal location that is used to serve
# audio files once correct permission / authentication
# has been checked on API side
# Set this to the same value as your MUSIC_DIRECTORY_PATH setting
internal;
alias /srv/funkwhale/data/music;
}
location /staticfiles/ {
# django static files
alias /srv/funkwhale/data/static/;
}
location /settings.json {
alias /srv/funkwhale/custom/settings.json;
}
location /custom {
alias /srv/funkwhale/custom;
}
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.