Dateien nach "/" hochladen

This commit is contained in:
2026-08-27 13:47:35 +02:00
parent 36a34a52c3
commit 8555d77d87
3 changed files with 214 additions and 0 deletions
+76
View File
@@ -0,0 +1,76 @@
# Copy this file to .env. docker-compose.yml loads it via env_file for both
# containers, and docker compose itself also uses it to resolve ${VAR}
# references inside docker-compose.yml (e.g. NGINX_PORT).
# ============================================================================
# Where packages.yaml comes from
# ============================================================================
# Option A: local file, bind-mounted into the syncer container. Uncomment
# the "../packages.yaml:/config/packages.yaml:ro" volume line under the
# syncer service in docker-compose.yml, leave SOURCES_GIT_REPO empty below,
# and set SOURCES_YAML_FILE to the absolute in-container mount path
# (/config/packages.yaml) to match.
SOURCES_GIT_REPO=https://gitea.leanderserver.de/leander19961/dnf-repo-test
SOURCES_GIT_BRANCH=main
SOURCES_YAML_FILE=packages.yaml
# Option B (default here): pull the list from git instead. Set
# SOURCES_GIT_REPO, and SOURCES_YAML_FILE to the path of the YAML file
# *inside* that git repo (relative), e.g.:
# SOURCES_GIT_REPO=https://git.example.com/infra/rpm-sources.git
# SOURCES_GIT_BRANCH=main
# SOURCES_YAML_FILE=packages.yaml
# (the local bind mount from Option A is then simply unused.)
# ============================================================================
# Paths inside the syncer container
# ============================================================================
# These map to the volumes defined in docker-compose.yml - only change them
# if you also change the corresponding volume mounts.
WORK_DIR=/var/cache/rpm-mirror-sync
REPO_BASE_DIR=/srv/repo
CLIENT_REPO_DIR=/srv/repo/client-repos
# ============================================================================
# Client-facing URL
# ============================================================================
# Public URL under which the nginx container serves the repo. Used to
# generate the .repo files under /repo/client-repos/. Point this at
# wherever the host running nginx is reachable from your AlmaLinux clients
# (should match NGINX_PORT below).
CLIENT_BASE_URL=http://repo.leanderserver.de/repo
# ============================================================================
# repoids of AlmaLinux's own repos inside the syncer container
# ============================================================================
# Check with: docker compose exec syncer dnf repolist
ALMA_REPO_IDS=baseos appstream extras crb
# ============================================================================
# Sync schedule
# ============================================================================
# How often (seconds) the syncer container re-syncs. 3600 = hourly.
SYNC_INTERVAL_SECONDS=3600
# Set to "true" to sync once and exit instead of looping (e.g. if you'd
# rather trigger this container from an external scheduler).
RUN_ONCE=false
# ============================================================================
# Mirror signing key
# ============================================================================
# Identity used for the ONE GPG key the mirror signs every mirrored package
# with (regardless of how many upstream sources there are). Generated once
# on first run - together with a revocation certificate - and reused
# forever. Both live under GPG_HOME on the sync-cache volume, so don't run
# "docker compose down -v" unless you're fine with clients having to
# re-trust a brand new key afterwards.
GPG_HOME=/var/cache/rpm-mirror-sync/gnupg
GPG_KEY_NAME=RPM Mirror
GPG_KEY_EMAIL=rpm-mirror@example.local
# ============================================================================
# Ports
# ============================================================================
# Host port nginx publishes the repo on.
NGINX_PORT=8081
+35
View File
@@ -0,0 +1,35 @@
services:
syncer:
build:
# Kontext ist das Repo-Root (eine Ebene ueber dieser Datei), damit der
# Dockerfile-Pfad zur tatsaechlichen Verzeichnisstruktur passt.
dockerfile: docker/syncer/Dockerfile
image: rpm-mirror-syncer:latest
container_name: rpm-mirror-syncer
restart: unless-stopped
env_file:
- .env
volumes:
# Oeffentliche Repo-Daten, read-write. Der Syncer legt darin pkgs/ an.
- repo-data:/srv/repo
# Geklonte packages.yaml und Lockfile - ueberlebt ein Recreate.
- sync-cache:/var/cache/rpm-mirror-sync
# Lokale packages.yaml statt Git. Wenn gemountet, hat sie Vorrang und
# CONFIG_REPO_URL wird nicht mehr gebraucht.
#- ../packages.yaml:/config/packages.yaml:ro
nginx:
image: nginx:alpine
container_name: rpm-mirror-nginx
restart: unless-stopped
depends_on:
- syncer
ports:
- "${NGINX_PORT:-8080}:80"
volumes:
- repo-data:/usr/share/nginx/html/repo:ro
- ./docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
volumes:
repo-data:
sync-cache:
+103
View File
@@ -0,0 +1,103 @@
# Kuratierte Paketliste fuer den Unternehmens-Mirror.
#
# Ein Paket kann entweder als reiner String stehen (dann wird der
# Paketname als Anzeigename und die Upstream-Summary uebernommen) oder als
# Mapping mit eigenen AppStream-Metadaten.
appstream:
# Muss eindeutig sein. Kollidiert der Origin mit dem einer Distribution
# ("almalinux"), ueberschreiben sich die Icon-Caches auf den Clients.
# APPSTREAM_ORIGIN aus der .env hat Vorrang vor diesem Wert.
origin: firmen-repo
# Praefix fuer generierte AppStream-IDs: <id_prefix>.<paketname>
id_prefix: de.firma.repo
defaults:
icon: applications-development
categories:
- Development
note: >-
Bereitgestellt über das Unternehmens-Repo der IT-Abteilung.
Fragen und Paketwünsche bitte an den IT-Service-Desk.
developer: "IT-Abteilung"
homepage: https://wiki.firma.intern/it/software-repo
sources:
# ------------------------------------------------------------------
# dotnet liegt bereits in AlmaLinux AppStream, das auf jedem Client
# aktiviert ist. Es waere Verschwendung, die RPMs zu spiegeln - wir
# wollen nur steuern, WAS davon in Discover auftaucht.
#
# metadata_only: true laedt deshalb kein einziges RPM herunter und
# steuert ausschliesslich AppStream-Sichtbarkeit bei. Die Installation
# loest dnf auf dem Client ganz normal aus AlmaLinux AppStream auf.
# ------------------------------------------------------------------
- name: alma-dotnet
baseurl: https://repo.almalinux.org/almalinux/10/AppStream/x86_64/os/
gpgkey: https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux-10
metadata_only: true
packages:
- name: dotnet-sdk-8.0
display_name: ".NET SDK 8.0 (LTS)"
summary: "SDK zum Entwickeln und Bauen von .NET-8-Anwendungen"
description: |
Enthält das dotnet-CLI, die Build-Tools und die Runtime für
.NET 8. Diese Version ist der unterstützte LTS-Stand.
Projekte legen ihre SDK-Version in der global.json fest.
binary: dotnet
keywords: [dotnet, csharp, netcore, sdk]
homepage: https://dotnet.microsoft.com/
- name: dotnet-runtime-8.0
display_name: ".NET Runtime 8.0 (LTS)"
summary: "Laufzeitumgebung zum Ausführen von .NET-8-Anwendungen"
# "binary:" macht daraus eine console-application statt eines
# generic-Bauteils - siehe Hinweis zu appstream.defaults weiter
# unten, warum das fuer die Sichtbarkeit in Discover wichtig ist.
# dotnet-runtime bringt /usr/bin/dotnet nicht selbst mit (das
# kommt ueber die dotnet-host-Abhaengigkeit), stellt es aber nach
# der Installation genauso bereit.
binary: dotnet
keywords: [dotnet, runtime]
- name: dotnet-sdk-9.0
display_name: ".NET SDK 9.0"
summary: "SDK zum Entwickeln und Bauen von .NET-9-Anwendungen"
binary: dotnet
keywords: [dotnet, csharp, sdk]
- name: dotnet-runtime-9.0
display_name: ".NET Runtime 9.0"
summary: "Laufzeitumgebung zum Ausführen von .NET-9-Anwendungen"
binary: dotnet
keywords: [dotnet, runtime]
- name: dotnet-sdk-10.0
display_name: ".NET SDK 10.0"
binary: dotnet
keywords: [dotnet, csharp, sdk]
- name: dotnet-runtime-10.0
display_name: ".NET Runtime 10.0"
binary: dotnet
keywords: [dotnet, runtime]
# ------------------------------------------------------------------
# Echtes Fremd-Repo: RPMs werden gespiegelt, gegen den Microsoft-Key
# geprueft und mit dem Mirror-Key neu signiert. Abhaengigkeiten, die
# AlmaLinux ohnehin liefert, werden verworfen.
# ------------------------------------------------------------------
#- name: vscode
# baseurl: https://packages.microsoft.com/yumrepos/vscode
# gpgkey: https://packages.microsoft.com/keys/microsoft.asc
# packages:
# - name: code
# display_name: "Visual Studio Code"
# summary: "Quelltexteditor mit Debugging und Git-Integration"
# # Bringt ein echtes .desktop-File mit, taucht damit auch beim
# # Stoebern und in den Kategorien auf - nicht nur in der Suche.
# type: desktop-application
# desktop_id: code.desktop
# categories: [Development, IDE]
# keywords: [editor, ide, vscode]