No description
  • Dockerfile 67.1%
  • Shell 32.9%
Find a file
Renovate Bot 64a7fee460
All checks were successful
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (amd64) (push) Successful in 19s
Container Publish / build-image (arm64) (push) Successful in 17s
Container Publish / update docker manifest (push) Successful in 32s
Merge pull request 'Update alpine Docker tag to v3.24' (#4) from renovate/docker-base-images into master
2026-06-09 20:37:49 +00:00
.forgejo/workflows Update vulnerability scan workflow to use Docker for Trivy installation and improve job naming convention 2026-03-10 12:03:14 +01:00
rootfs/app initial release 2026-01-05 12:16:59 +01:00
Dockerfile Update alpine Docker tag to v3.24 2026-06-09 20:37:40 +00:00
LICENSE initial release 2026-01-05 12:16:59 +01:00
README.md Update README to include TINI_SUBREAPER environment variable for Traefik service 2026-04-20 14:29:54 +02:00
renovate.json Add Renovate configuration for automated dependency management 2026-03-10 12:03:23 +01:00

logrotate sidecar container

usage

Sample docker-compose.yaml file:

services:
  traefik:
    image: traefik:v3
    container_name: traefik
    restart: always
    command:
      - "--configFile=/config/traefik.yaml"
    environment:
      - TZ=Europe/Rome
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./config:/config
      - ./logs:/logs
      - ./acme:/acme
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      - backend

  traefik-logrotate:
    image: docker.asperti.com/paspo/logrotate:latest
    container_name: traefik-logrotate
    restart: always
    depends_on:
      - traefik
    pid: "service:traefik"  # this is needed to signal traefik reload
    environment:
      TINI_SUBREAPER: true  # and tou need this, otherwise tini will cry
    volumes:
      - ./logs:/logs
      - ./logrotate.conf:/etc/logrotate.d/traefik.conf:ro

Sample logrotate.conf file:

/logs/access.log {
    daily
    rotate 14
    missingok
    notifempty
    compress
    delaycompress
    copytruncate
    size 200M

    postrotate
        kill -USR1 1
    endscript
}

manual run

docker compose exec traefik-logrotate /etc/periodic/daily/logrotate