Dokploy / Dokploy/dokploy

Response Compression in Traefik

Open
#3,494 5 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

What problem will this feature address?

I noticed that most HTTP responses are uncompressed.

Image
Describe the solution you'd like

Traefik supports the Compress middleware. It would be great if response compression can be enabled server-wide (like how Cloudflare's automatically compresses HTTP responses if the upstream doesn't do it).

Describe alternatives you've considered

Currently I am using manually editing Traefik config.

First I have to create a dynamic config file:

# /etc/dokploy/traefik/dynamic/compress.yml
http:
  middlewares:
    compress:
      compress:
        encodings: [br, zstd, gzip]

Then I have to edit the main config file to use this middleware globally:

# /etc/dokploy/traefik/traefik.yml (excerpt)
entryPoints:
  web:
    address: :80
    http: # 👈 NEW
      middlewares:
        - compress@file
  websecure:
    address: :443
    http3:
      advertisedPort: 443
    http:
      tls:
        certResolver: letsencrypt
      middlewares: # 👈 NEW
        - compress@file

After reloading, responses are now compressed.

Image
Additional context

No response

Will you send a PR to implement it?

No

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how Dokploy generates /etc/dokploy/traefik/dynamic/compress.yml and /etc/dokploy/traefik/traefik.yml. Confirm how entry points and middleware configuration are exposed, then verify that newly generated Traefik configuration compresses eligible HTTP responses without manual edits.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
devops, infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.