41 lines
1.4 KiB
YAML
41 lines
1.4 KiB
YAML
# Aus DIESEM Verzeichnis heraus starten:
|
|
# cd docker && docker compose up -d --build
|
|
services:
|
|
syncer:
|
|
build:
|
|
# Kontext ist das docker/-Verzeichnis, in dem auch diese Datei liegt.
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: rpm-mirror-syncer:latest
|
|
container_name: rpm-mirror-syncer
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
# repo-data enthaelt ausschliesslich oeffentliche Dateien und wird
|
|
# deshalb auch vom nginx-Container gemountet.
|
|
- repo-data:/srv/repo
|
|
# sync-cache haelt den Git-Checkout der Paketliste und spaeter den
|
|
# privaten GPG-Signierschluessel - absichtlich NICHT in nginx.
|
|
- sync-cache:/var/cache/rpm-mirror-sync
|
|
# Nur noetig, wenn die Paketliste NICHT aus Git kommt
|
|
# (SOURCES_GIT_REPO leer lassen). Sonst auskommentiert lassen.
|
|
#- ${LOCAL_SOURCES_YAML:-./packages.example.yaml}:/config/sources.yaml:ro
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: rpm-mirror-nginx
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- syncer
|
|
ports:
|
|
- "${NGINX_PORT:-8081}:80"
|
|
volumes:
|
|
# Mount-Ziel und der Root in nginx.conf muessen zusammenpassen:
|
|
# root /usr/share/nginx/html + Mount auf .../html/repo => URL /repo/
|
|
- repo-data:/usr/share/nginx/html/repo:ro
|
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
|
|
volumes:
|
|
repo-data:
|
|
sync-cache: |