53 lines
1.9 KiB
YAML
53 lines
1.9 KiB
YAML
services:
|
|
updater:
|
|
image: git.send.nrw/sendnrw/go-ubuntu-mirror:latest # unverändert vom vorherigen Setup
|
|
container_name: ubuntu-mirror-updater
|
|
restart: unless-stopped
|
|
volumes:
|
|
- mirror-data:/var/spool/apt-mirror
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile # <- die Alpine-Datei oben
|
|
container_name: ubuntu-mirror-web
|
|
restart: unless-stopped
|
|
depends_on: [updater]
|
|
volumes:
|
|
- mirror-data:/data:ro
|
|
command: >
|
|
-archive=/data/mirror/archive.ubuntu.com/ubuntu
|
|
-security=/data/mirror/security.ubuntu.com/ubuntu
|
|
-old=/data/mirror/old-releases.ubuntu.com/ubuntu
|
|
-autoindex=true
|
|
-cache=600
|
|
-addr=:8080
|
|
labels:
|
|
- traefik.enable=true
|
|
# HTTPS Router
|
|
- traefik.http.routers.ubuntu_mirror.rule=Host(`ubuntu-24-04.send.nrw`)
|
|
- traefik.http.routers.ubuntu_mirror.entrypoints=websecure
|
|
- traefik.http.routers.ubuntu_mirror.tls=true
|
|
- traefik.http.routers.ubuntu_mirror.tls.certresolver=letsencrypt
|
|
- traefik.http.routers.ubuntu_mirror.service=ubuntu_mirror_svc
|
|
# HTTP -> HTTPS Redirect
|
|
- traefik.http.routers.ubuntu_mirror_http.rule=Host(`ubuntu-24-04.send.nrw`)
|
|
- traefik.http.routers.ubuntu_mirror_http.entrypoints=web
|
|
- traefik.http.routers.ubuntu_mirror_http.middlewares=to-https
|
|
- traefik.http.routers.ubuntu_mirror_http.service=ubuntu_mirror_svc
|
|
- traefik.http.middlewares.to-https.redirectscheme.scheme=https
|
|
- traefik.http.middlewares.to-https.redirectscheme.permanent=true
|
|
# Service-Ziel (Go-Server auf 8080)
|
|
- traefik.http.services.ubuntu_mirror_svc.loadbalancer.server.port=8080
|
|
- traefik.http.services.ubuntu_mirror_svc.loadbalancer.server.scheme=http
|
|
# Optional: externes Traefik-Netz
|
|
# - traefik.docker.network=traefik_proxy
|
|
# networks:
|
|
# - traefik_proxy
|
|
|
|
volumes:
|
|
mirror-data:
|
|
# networks:
|
|
# traefik_proxy:
|
|
# external: true
|