pycontw / pycon.tw

PyCon TW Proposal System & Backend Server
https://tw.pycon.org/prs
MIT License
94 stars 107 forks source link

build(dockerfile): enhanced production dockerfile #1151

Closed iknowright closed 10 months ago

iknowright commented 10 months ago

Types of changes

Description

Use multi-stage feature on Docker to enable easy-read and better maintenance for Dockerfile

Two stages: node_stage and python_stage node_stage:

python_stage:

Notes:

Steps to Test This Pull Request

Expected behavior

Size reduced up to 50% and more

from the staging environment, test results are as follow: pycontw-2023_web-enhanced-dockerfile latest e620e4f466ac 24 seconds ago 626MB pycontw-2023_web latest 11ff9f780b7d 2 weeks ago 1.56GB

closes #1139

codecov-commenter commented 10 months ago

Codecov Report

Patch coverage: 66.66% and project coverage change: +0.47% :tada:

Comparison is base (74b334a) 69.74% compared to head (eb9bdd1) 70.21%. Report is 8 commits behind head on master.

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1151 +/- ## ========================================== + Coverage 69.74% 70.21% +0.47% ========================================== Files 85 85 Lines 3378 3381 +3 ========================================== + Hits 2356 2374 +18 + Misses 1022 1007 -15 ``` | [Files Changed](https://app.codecov.io/gh/pycontw/pycon.tw/pull/1151?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw) | Coverage Δ | | |---|---|---| | [src/ccip/views.py](https://app.codecov.io/gh/pycontw/pycon.tw/pull/1151?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw#diff-c3JjL2NjaXAvdmlld3MucHk=) | `33.98% <50.00%> (+0.31%)` | :arrow_up: | | [src/sponsors/translation.py](https://app.codecov.io/gh/pycontw/pycon.tw/pull/1151?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw#diff-c3JjL3Nwb25zb3JzL3RyYW5zbGF0aW9uLnB5) | `100.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/pycontw/pycon.tw/pull/1151/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pycontw)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

iknowright commented 10 months ago

Thanks @iknowright for making this change, I think we also need to apply these changes todev.Dockerfile. Could you help me update that?

Updated.