diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 5cd1884..3768d4b 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,22 +1,26 @@ +# 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: docker/syncer/Dockerfile + dockerfile: Dockerfile image: rpm-mirror-syncer:latest container_name: rpm-mirror-syncer restart: unless-stopped env_file: - .env volumes: - # sync-cache also holds the mirror's private GPG signing key and its - # revocation certificate (WORK_DIR/gnupg) - intentionally NOT mounted - # into the nginx container, only repo-data (public files) is. + # 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 - # Local sources.yaml, only used when SOURCES_GIT_REPO is empty (see - # .env). Remove/comment this out if you fetch the list from git. - #- ${LOCAL_SOURCES_YAML:-./sources.example.yaml}:/config/sources.yaml:ro + # 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 @@ -24,14 +28,14 @@ services: restart: unless-stopped depends_on: - syncer - env_file: - - .env ports: - - "${NGINX_PORT:-8080}:80" + - "${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 - - ./docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro + - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro volumes: repo-data: - sync-cache: + sync-cache: \ No newline at end of file