webp-sh / webp_server_go

Go version of WebP Server. A tool that will serve your JPG/PNG/BMP/SVGs as WebP/AVIF format with compression, on-the-fly.
https://docs.webp.sh
GNU General Public License v3.0
1.83k stars 175 forks source link

Add libjemalloc2 and libtcmalloc-minimal4 to Dockerfile #222

Closed n0vad3v closed 1 year ago

n0vad3v commented 1 year ago

This PR adds two malloc lib to Dockerfile, which allows user to switch between them:

version: '3'

services:
  webp:
    image: webpsh/webp-server-go
    restart: always
    environment:
      - MALLOC_ARENA_MAX=1
      #- LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
      - LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4.5.6
    volumes:
      - ./pics:/opt/pics
      - ./exhaust:/opt/exhaust
      - ./config.json:/etc/config.json
    ports:
      -  127.0.0.1:3333:3333
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
codecov[bot] commented 1 year ago

Codecov Report

Merging #222 (08a0097) into master (9efead2) will decrease coverage by 3.24%. The diff coverage is 77.81%.

@@            Coverage Diff             @@
##           master     #222      +/-   ##
==========================================
- Coverage   83.57%   80.34%   -3.24%     
==========================================
  Files           6        6              
  Lines         542      636      +94     
==========================================
+ Hits          453      511      +58     
- Misses         61       85      +24     
- Partials       28       40      +12     
Impacted Files Coverage Δ
encoder.go 67.03% <68.88%> (-10.11%) :arrow_down:
helper.go 82.35% <74.60%> (-6.42%) :arrow_down:
router.go 93.16% <95.00%> (+3.47%) :arrow_up:
config.go 100.00% <100.00%> (ø)
prefetch.go 100.00% <100.00%> (ø)
webp-server.go 79.20% <100.00%> (+2.03%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)