Skip to content
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

fix(Dockerfile): Add mime-support apt package at dockerfile to resolve svg not showing #1160

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

iknowright
Copy link
Contributor

Types of changes

  • Bugfix
  • New feature
  • Refactoring
  • Breaking change (any change that would cause existing functionality not to work as expected)
  • Documentation Update
  • Other (please describe)

Description

PyCon icon (SVG) not showing on the top-left corner of the PR page (applied to all SVG)
The bug happens when static files are served using uWSGI but not the debug server.
The uWSGI resolves the .svg response to text/plain instead of image/svg+xml.

Related Issue

#1139 and #1151
After the enhancement of the Dockerfile, some required package is no longer included in the base image, causing unexpected behaviors.

More Information

The hotfix has been applied to the staging server, as it only occurs in the production environment that is run by uWSGI.

Solution
Reference here
add apt-get install mime-support to Dockerfile could solve this issue, and it did.

@iknowright iknowright self-assigned this Feb 18, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (267c525) 70.59% compared to head (5fca928) 70.59%.
Report is 1 commits behind head on master.

❗ Current head 5fca928 differs from pull request most recent head 091501a. Consider uploading reports for the commit 091501a to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1160   +/-   ##
=======================================
  Coverage   70.59%   70.59%           
=======================================
  Files          85       85           
  Lines        3394     3394           
=======================================
  Hits         2396     2396           
  Misses        998      998           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Dockerfile Show resolved Hide resolved
@mattwang44
Copy link
Member

mattwang44 commented Feb 18, 2024

除了 icon 顯示問題外,也有遇到其他 static file 的問題(e.g. 在 admin site 上傳 sponsor logo 會失敗),這會一起解掉嗎?
update: https://discord.com/channels/752904426057892052/753841328198254642/1208848697312546836

feat: update PyConTW 2023 to 2024(BackEnd)
@SivanYeh SivanYeh merged commit 8331a9b into master Feb 22, 2024
1 check passed
josix added a commit that referenced this pull request Apr 7, 2024
commit f349915
Merge: f44e7ea d680271
Author: Sivan <sivanyeh@gmail.com>
Date:   Sun Apr 7 19:37:26 2024 +0800

    Merge pull request #1170 from pycontw/resolve-cve-babel-traverse

    deps: resolve CVE-2023-45133

commit d680271
Author: Matt Wang <mattwang44@gmail.com>
Date:   Sat Apr 6 01:50:00 2024 +0800

    chore: use babel7 in the compressor command

commit 1af235f
Author: Matt Wang <mattwang44@gmail.com>
Date:   Sat Apr 6 01:44:34 2024 +0800

    deps: upgrade babel and presets

    `babel-upgrade` is utlized to replace the presets with multiple packages.
    https://github.com/babel/babel-upgrade

commit 228ec3e
Author: Matt Wang <mattwang44@gmail.com>
Date:   Sat Apr 6 01:43:14 2024 +0800

    chore(docker): update for better cache utilizing when rebuild

commit f44e7ea
Merge: d956956 7726ba7
Author: Sivan <sivanyeh@gmail.com>
Date:   Sat Feb 24 15:41:51 2024 +0800

    Merge pull request #1166 from pycontw/feat-delete-cfp-preferred-date

    remove prefer_time for cfp

commit 7726ba7
Author: svyeh <sivanyeh@gmail.com>
Date:   Sat Feb 24 15:41:13 2024 +0800

    remove prefer_time in messages

commit dfabd13
Author: svyeh <sivanyeh@gmail.com>
Date:   Sat Feb 24 15:13:55 2024 +0800

    remove prefer_time in tests

commit 28e454a
Author: svyeh <sivanyeh@gmail.com>
Date:   Sat Feb 24 10:27:32 2024 +0800

    remove prefer_time

    remove prefer_time from src/core/choices.py and src/core/models.py then executed the following:
    $ python manage.py makemigrations
    $python manage.py makemessages -l en_US -l zh_Hant

commit d956956
Merge: a3fa21b 9961b6f
Author: svyeh <sivanyeh@gmail.com>
Date:   Thu Feb 22 18:47:57 2024 +0800

    Merge branch 'adjust_conference_date_to_2024'

commit a3fa21b
Merge: 4a2c1db 5203935
Author: Sivan <sivanyeh@gmail.com>
Date:   Thu Feb 22 18:15:36 2024 +0800

    Merge pull request #1164 from pycontw/check_master

    fix-2024-migrate-error

commit 5203935
Author: svyeh <sivanyeh@gmail.com>
Date:   Thu Feb 22 17:30:57 2024 +0800

    switch back .python-version to 3.6.8

commit 4a2c1db
Merge: 8331a9b fddc160
Author: Sivan <sivanyeh@gmail.com>
Date:   Thu Feb 22 17:19:51 2024 +0800

    Merge pull request #1165 from rockleona/feat/coc-update

    feat: add procedure image in CoC

commit fddc160
Author: rockleona <rockleonjp@gmail.com>
Date:   Thu Feb 22 14:17:23 2024 +0800

    feat: add procedure image in CoC

commit 8331a9b
Merge: d9b684b 091501a
Author: Sivan <sivanyeh@gmail.com>
Date:   Thu Feb 22 13:58:44 2024 +0800

    Merge pull request #1160 from pycontw/ben/fix-svg-no-show

    fix(Dockerfile): Add mime-support apt package at dockerfile to resolve svg not showing

commit 9961b6f
Author: svyeh <sivanyeh@gmail.com>
Date:   Wed Feb 21 15:16:02 2024 +0800

    apply makemigrations and makemessages

    auto result after two cmd:
    $python manage.py makemigrations

    $python manage.py makemessages -l en_US -l zh_Hant

commit 091501a
Merge: 5fca928 d9b684b
Author: Josix <josixwang@gmail.com>
Date:   Wed Feb 21 14:36:48 2024 +0800

    Merge branch 'master' into ben/fix-svg-no-show

commit b285d42
Author: svyeh <sivanyeh@gmail.com>
Date:   Wed Feb 21 13:54:43 2024 +0800

    adjust allowed_host

commit d09ca24
Author: svyeh <sivanyeh@gmail.com>
Date:   Wed Feb 21 12:29:28 2024 +0800

    fix typo

commit a280a4f
Author: svyeh <sivanyeh@gmail.com>
Date:   Wed Feb 21 00:14:09 2024 +0800

    Update django.po

commit 6b90e35
Author: svyeh <sivanyeh@gmail.com>
Date:   Tue Feb 20 22:17:21 2024 +0800

    adjustment_from_staging_2024-migrate

commit 5fca928
Merge: 8da7a3a d6e616b
Author: Sivan <sivanyeh@gmail.com>
Date:   Sun Feb 18 09:16:14 2024 +0800

    Merge pull request #1155 from pycontw/2024-migrate

    feat: update PyConTW 2023 to 2024(BackEnd)

commit d9b684b
Merge: d3d5005 267c525
Author: Sivan <sivanyeh@gmail.com>
Date:   Mon Feb 19 21:12:33 2024 +0800

    Merge pull request #1161 from rockleona/feat/coc-update

    feat: update code-of-conduct 2024 version

commit 267c525
Author: RockLeon <34214497+rockleona@users.noreply.github.com>
Date:   Mon Feb 19 21:08:57 2024 +0800

    Apply suggestions from code review

    Co-authored-by: Sivan <sivanyeh@gmail.com>

commit 5b265fa
Author: Sivan <sivanyeh@gmail.com>
Date:   Mon Feb 19 20:27:55 2024 +0800

    update en-coc effective date

    2023->2024/02/20

commit a1766ad
Author: Sivan <sivanyeh@gmail.com>
Date:   Mon Feb 19 20:07:18 2024 +0800

    Update code-of-conduct.html

    Differences compare to the provided doc

commit b674918
Author: svyeh <sivanyeh@gmail.com>
Date:   Mon Feb 19 13:23:45 2024 +0800

    adjust_conference_date_to_2024

    update date in 2023 to 2024

commit b920937
Author: rockleona <rockleonjp@gmail.com>
Date:   Sun Feb 18 21:31:40 2024 +0800

    feat: update code-of-conduct 2024 version

commit d3d5005
Merge: 8da7a3a d6e616b
Author: Sivan <sivanyeh@gmail.com>
Date:   Sun Feb 18 09:16:14 2024 +0800

    Merge pull request #1155 from pycontw/2024-migrate

    feat: update PyConTW 2023 to 2024(BackEnd)

commit d6e616b
Merge: 3deb4db 8da7a3a
Author: Sivan <sivanyeh@gmail.com>
Date:   Sat Feb 17 23:53:49 2024 +0800

    Merge branch 'master' into 2024-migrate

commit 8da7a3a
Merge: c520012 913fef7
Author: Josix <josixwang@gmail.com>
Date:   Sun Jan 28 09:38:16 2024 +0800

    Merge pull request #1157 from pycontw/fix_node_not_found

commit 913fef7
Author: iknowright <changchaishi@gmail.com>
Date:   Sat Jan 27 18:28:03 2024 +0800

    fix: dockerfile

    fix node_modules path for production dockerfile

commit 3deb4db
Author: Matt Wang <mattwang44@gmail.com>
Date:   Sat Jan 27 14:33:47 2024 +0800

    fix(docker): update uwsgi mount path

commit 731cb60
Author: Matt Wang <mattwang44@gmail.com>
Date:   Sat Jan 27 12:40:38 2024 +0800

    fix(assest): fix logo path

commit 26d97c3
Author: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
Date:   Sat Jan 27 03:08:37 2024 +0000

    fix(migration): add migration scripts

commit 9189009
Author: Sivan <sivanyeh@gmail.com>
Date:   Mon Jan 22 22:28:22 2024 +0800

    Update src/templates/pycontw-2024/contents/_base.html

    Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>

commit 0fa8f3b
Author: Sivan <sivanyeh@gmail.com>
Date:   Mon Jan 22 21:50:46 2024 +0800

    Update base.html from 2023 to 2024

    Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>

commit 9a0e16f
Author: svyeh <sivanyeh@gmail.com>
Date:   Mon Jan 22 17:30:44 2024 +0800

    feat: update PyConTW 2023 to 2024(BackEnd)

    feat: update PyConTW 2023 to 2024(BackEnd)
@iknowright iknowright deleted the ben/fix-svg-no-show branch May 1, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants