Funkwhale /media/albums/covers not displaying song covers
I am using a local installation of Funkwhale in an LXC container (version 1.2.9), and it works perfectly. I migrated the project to Docker with an upgrade to version 1.3.1 following the official instructions. After the migration, I noticed that approximately half of my songs are missing their album covers, which are located in the path /media/albums/covers/...
The actual cover images exist on the server, but the frontend cannot see them and returns an error:
"Sorry, the page you were looking for does not exist:
https://music.local/media/albums/covers/2019/09/23/9a274ded-583a-4860-abab-8b942e07a2fa.jpg"
If I reupload a song, the cover ends up in the path /media/attachments
and is displayed correctly. However, there are thousands of such songs! How can I automate this process? I have looked at the changelog and performed the following actions before the migration:
source /var/calculate/www/funkwhale/virtualenv/bin/activate
rm -rf /var/calculate/www/funkwhale/data/media/sized/
python manage.py fw media generate-thumbnails
Funkwhale is set up behind Nginx Proxy Manager with socket support, etc. Here is my .env configuration:
POSTGRES_USER=funkwhale
POSTGRES_PASSWORD=funkwhale
POSTGRES_DB=funkwhale
LANG=ru_RU.utf8
FUNKWHALE_VERSION=1.3.0
FUNKWHALE_API_IP=127.0.0.1
FUNKWHALE_API_PORT=5000
FUNKWHALE_WEB_WORKERS=4
FUNKWHALE_HOSTNAME=music.local
FUNKWHALE_PROTOCOL=https
LOGLEVEL=error
EMAIL_CONFIG=smtp://mysmtp:25
DEFAULT_FROM_EMAIL=noreply@funkwhale.calculate.ru
REVERSE_PROXY_TYPE=nginx
DATABASE_URL=postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres/$POSTGRES_DB
CACHE_URL=redis://redis:6379/0
DJANGO_SETTINGS_MODULE=config.settings.production
DJANGO_SECRET_KEY=secret
DJANGO_ADMIN_URL=^api/admin/
PROXY_MEDIA=true
MEDIA_ROOT=/data/media
STATIC_ROOT=/data/static
MUSIC_DIRECTORY_PATH=/data/music
FUNKWHALE_FRONTEND_PATH=/data/front/dist
MUSIC_DIRECTORY_SERVE_PATH=./music
NGINX_MAX_BODY_SIZE=100M
#THUMBNAIL_JPEG_RESIZE_QUALITY=70
My docker-compose.yml file:
#https://docs.funkwhale.audio/administrator/installation/docker.html
# https://dev.funkwhale.audio/funkwhale/funkwhale/raw/1.3.0/deploy/docker-compose.yml
version: "3.9"
services:
postgres:
image: postgres:15-alpine
env_file: .env
volumes:
- ./postgres-15:/var/lib/postgresql/data
networks:
- local
restart: unless-stopped
redis:
image: redis:7-alpine
env_file: .env
volumes:
- ./redis:/data
networks:
- local
restart: unless-stopped
celeryworker:
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
env_file: .env
command:
- celery
- --app=funkwhale_api.taskapp
- worker
- --loglevel=INFO
- --concurrency=${CELERYD_CONCURRENCY-0}
depends_on:
- postgres
- redis
volumes:
- "./music:/music:ro"
- "./media:${MEDIA_ROOT}"
networks:
- local
restart: unless-stopped
celerybeat:
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
env_file: .env
command:
- celery
- --app=funkwhale_api.taskapp
- beat
- --loglevel=INFO
depends_on:
- postgres
- redis
networks:
- local
restart: unless-stopped
api:
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
env_file: .env
depends_on:
- postgres
- redis
volumes:
- "./music:${MUSIC_DIRECTORY_PATH-/music}:ro"
- "./media:${MEDIA_ROOT}"
- "./static:${STATIC_ROOT}"
healthcheck:
test: ["CMD-SHELL", "funkwhale-manage test"]
interval: 5s
timeout: 5s
retries: 10
networks:
- local
- proxy
restart: unless-stopped
funkwhale:
image: funkwhale/front:${FUNKWHALE_VERSION:-latest}
env_file: .env
depends_on:
api:
condition: service_healthy
volumes:
- "./music:${MUSIC_DIRECTORY_PATH-/music}:ro"
- "./media:${MEDIA_ROOT}:ro"
- "./static:/usr/share/nginx/html/staticfiles:ro"
networks:
- proxy
- local
restart: unless-stopped
networks:
local:
proxy:
external: true
# https://dev.funkwhale.audio/funkwhale/funkwhale/raw/1.3.0/deploy/docker-compose.yml
version: "3.9"
services:
postgres:
image: postgres:15-alpine
env_file: .env
volumes:
- ./postgres-15:/var/lib/postgresql/data
networks:
- local
restart: unless-stopped
redis:
image: redis:7-alpine
env_file: .env
volumes:
- ./redis:/data
networks:
- local
restart: unless-stopped
celeryworker:
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
env_file: .env
command:
- celery
- --app=funkwhale_api.taskapp
- worker
- --loglevel=INFO
- --concurrency=${CELERYD_CONCURRENCY-0}
depends_on:
- postgres
- redis
volumes:
- "./music:/music:ro"
- "./media:${MEDIA_ROOT}"
networks:
- local
restart: unless-stopped
celerybeat:
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
env_file: .env
command:
- celery
- --app=funkwhale_api.taskapp
- beat
- --loglevel=INFO
depends_on:
- postgres
- redis
networks:
- local
restart: unless-stopped
api:
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
env_file: .env
depends_on:
- postgres
- redis
volumes:
- "./music:${MUSIC_DIRECTORY_PATH-/music}:ro"
- "./media:${MEDIA_ROOT}"
- "./static:${STATIC_ROOT}"
healthcheck:
test: ["CMD-SHELL", "funkwhale-manage test"]
interval: 5s
timeout: 5s
retries: 10
networks:
- local
- proxy
restart: unless-stopped
funkwhale:
image: funkwhale/front:${FUNKWHALE_VERSION:-latest}
env_file: .env
depends_on:
api:
condition: service_healthy
volumes:
- "./music:${MUSIC_DIRECTORY_PATH-/music}:ro"
- "./media:${MEDIA_ROOT}:ro"
- "./static:/usr/share/nginx/html/staticfiles:ro"
networks:
- proxy
- local
restart: unless-stopped
networks:
local:
proxy:
external: true
A list of migrations might be helpful:
33cd7f4470b9:/data/media# funkwhale-manage showmigrations
account
[X] 0001_initial
[X] 0002_email_max_length
admin
[X] 0001_initial
[X] 0002_logentry_remove_auto_add
[X] 0003_logentry_add_action_flag_choices
audio
[X] 0001_initial
[X] 0002_channel_metadata
[X] 0003_channel_rss_url
[X] 0004_alter_channel_metadata
auth
[X] 0001_initial
[X] 0002_alter_permission_name_max_length
[X] 0003_alter_user_email_max_length
[X] 0004_alter_user_username_opts
[X] 0005_alter_user_last_login_null
[X] 0006_require_contenttypes_0002
[X] 0007_alter_validators_add_error_messages
[X] 0008_alter_user_username_max_length
[X] 0009_alter_user_last_name_max_length
[X] 0010_alter_group_name_max_length
[X] 0011_update_proxy_permissions
[X] 0012_alter_user_first_name_max_length
authtoken
[X] 0001_initial
[X] 0002_auto_20160226_1747
[X] 0003_tokenproxy
common
[X] 0001_initial
[X] 0002_mutation
[X] 0003_cit_extension
[X] 0004_auto_20191111_1338
[X] 0005_auto_20191125_1421
[X] 0006_content
[X] 0007_auto_20200116_1610
[X] 0008_auto_20200701_1317
[X] 0009_auto_20220627_1915
contenttypes
[X] 0001_initial
[X] 0002_remove_content_type_name
dynamic_preferences
[X] 0001_initial
[X] 0002_auto_20150712_0332
[X] 0003_auto_20151223_1407
[X] 0004_move_user_model
[X] 0005_auto_20181120_0848
[X] 0006_auto_20191001_2236
favorites
[X] 0001_initial
federation
[X] 0001_initial
[X] 0002_auto_20180403_1620
[X] 0003_auto_20180407_1010
[X] 0004_auto_20180410_2025
[X] 0005_auto_20180413_1723
[X] 0006_auto_20180521_1702
[X] 0007_auto_20180807_1748
[X] 0008_auto_20180807_1748
[X] 0009_auto_20180822_1956
[X] 0010_auto_20180904_2011
[X] 0011_auto_20180910_1902
[X] 0012_auto_20180920_1803
[X] 0013_auto_20181226_1935
[X] 0014_auto_20181205_0958
[X] 0015_populate_domains
[X] 0016_auto_20181227_1605
[X] 0017_auto_20190130_0926
[X] 0018_fetch
[X] 0019_auto_20190611_0851
[X] 0020_auto_20190730_0846
[X] 0021_auto_20191029_1257
[X] 0022_auto_20191204_1539
[X] 0023_actor_summary_obj
[X] 0024_actor_attachment_icon
[X] 0025_auto_20200317_0820
[X] 0026_public_key_format
[X] 0027_auto_20220627_1915
[X] 0028_auto_20221027_1141
history
[X] 0001_initial
[X] 0002_auto_20180325_1433
moderation
[X] 0001_initial
[X] 0002_auto_20190213_0927
[X] 0003_report
[X] 0004_note
[X] 0005_auto_20200317_0820
[X] 0006_auto_20200803_1222
[X] 0007_auto_20220627_1915
music
[X] 0001_initial
[X] 0002_auto_20151215_1645
[X] 0003_auto_20151222_2233
[X] 0004_track_tags
[X] 0005_deduplicate
[X] 0006_unique_mbid
[X] 0007_track_position
[X] 0008_auto_20160529_1456
[X] 0009_auto_20160920_1614
[X] 0010_auto_20160920_1742
[X] 0011_rename_files
[X] 0012_auto_20161122_1905
[X] 0013_auto_20171213_2211
[X] 0014_importjob_track_file
[X] 0015_bind_track_file_to_import_job
[X] 0016_trackfile_acoustid_track_id
[X] 0017_auto_20171227_1728
[X] 0018_auto_20180218_1554
[X] 0019_populate_mimetypes
[X] 0020_importbatch_status
[X] 0021_populate_batch_status
[X] 0022_importbatch_import_request
[X] 0023_auto_20180407_1010
[X] 0024_populate_uuid
[X] 0025_auto_20180419_2023
[X] 0026_trackfile_accessed_date
[X] 0027_auto_20180515_1808
[X] 0028_importjob_replace_if_duplicate
[X] 0029_auto_20180807_1748
[X] 0030_auto_20180825_1411
[X] 0031_auto_20180914_2007
[X] 0032_track_file_to_upload
[X] 0033_auto_20181023_1837
[X] 0034_auto_20181127_0325
[X] 0035_auto_20181203_1515
[X] 0036_track_disc_number
[X] 0037_auto_20190103_1757
[X] 0038_attributed_to
[X] 0039_auto_20190423_0820
[X] 0040_auto_20191021_1318
[X] 0041_auto_20191021_1705
[X] 0042_album_attachment_cover
[X] 0043_album_cover_attachment
[X] 0044_full_text_search
[X] 0045_full_text_search_stop_words
[X] 0046_auto_20200113_1018
[X] 0047_auto_20200116_1246
[X] 0048_auto_20200120_0900
[X] 0049_auto_20200122_1020
[X] 0050_auto_20200129_1344
[X] 0051_auto_20200319_1249
[X] 0052_auto_20200505_0810
[X] 0053_denormalize_audio_permissions
[X] 0054_alter_uploadversion_mimetype
[X] 0055_auto_20220627_1915
[X] 0056_alter_artist_content_category
[X] 0057_auto_20221118_2108
playlists
[X] 0001_initial
[X] 0002_auto_20180316_2217
[X] 0003_auto_20180319_1214
[X] 0004_auto_20180320_1713
radios
[X] 0001_initial
[X] 0002_radiosession_session_key
[X] 0003_auto_20160521_1708
[X] 0004_auto_20180107_1813
[X] 0005_auto_20200803_1222
[X] 0006_radiosession_config
[X] 0006_alter_radio_config
[X] 0007_merge_20220715_0801
requests
[X] 0001_initial
sessions
[X] 0001_initial
sites
[X] 0001_initial
[X] 0002_set_site_domain_and_name
[X] 0003_auto_20171214_2205
[X] 0004_alter_site_options
socialaccount
[X] 0001_initial
[X] 0002_token_max_lengths
[X] 0003_extra_data_default_dict
tags
[X] 0001_initial
[X] 0002_auto_20200803_1222
users
[X] 0001_initial
[X] 0002_auto_20171214_2205
[X] 0003_auto_20171226_1357
[X] 0004_user_privacy_level
[X] 0005_user_subsonic_api_token
[X] 0006_auto_20180517_2324
[X] 0007_auto_20180524_2009
[X] 0008_auto_20180617_1531
[X] 0009_auto_20180619_2024
[X] 0010_user_avatar
[X] 0011_auto_20180721_1317
[X] 0012_user_upload_quota
[X] 0013_auto_20181206_1008
[X] 0014_oauth
[X] 0015_application_scope
[X] 0016_auto_20190920_0857
[X] 0017_actor_avatar
[X] 0018_auto_20200705_0829
[X] 0019_auto_20200718_0741
[X] 0020_application_token
[X] 0021_auto_20210703_1810
[X] 0022_auto_20221119_1819
[X] 0022_alter_user_settings
[X] 0023_merge_20221125_1902