Files
lpic-sim/ai/common/templates/docker/docker-compose.yml
T
Björn RundenandClaude Opus 5.5 7f6b8ebe07 Basis aus 2nd-brain für LPIC-Prüfungsvorbereitung übernommen
Regeln, Standards, Kontextstruktur und Werkzeuge übernommen; 2nd-brain-
Inhalte (Stacks, Ansible-Inventar, Architektur, Knowledge) entfernt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 21:56:53 +01:00

49 lines
1.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#-------------------------------------------------------------------------------
## @file docker-compose.yml
## @brief <Stack-Zweck in einem Satz>
## @author <AUTOR – aus ai/context/responsible.md>
## @owner <VERANTWORTLICH – aus ai/context/responsible.md>
## @version 0.1.0 (TT.MM.JJJJ)
## @usage docker compose up -d (im Stack-Verzeichnis, .env aus .env.example)
#-------------------------------------------------------------------------------
x-logging: &default-logging
driver: gelf
options:
gelf-address: "udp://${GELF_HOST}:${GELF_PORT}"
tag: "${COMPOSE_PROJECT_NAME}"
labels: "com.docker.compose.project,com.docker.compose.service"
services:
app:
image: <hersteller>/<image>:${APP_TAG}
container_name: ${COMPOSE_PROJECT_NAME}
restart: unless-stopped
env_file: .env
# ports: nur wenn Zugriff ohne Traefik nötig ist
# - "${APP_PORT}:<intern>"
extra_hosts: # nur wenn benötigt; ein Eintrag je Variable
- "${EXTRA_HOST_1}"
volumes:
- ${DIR_DATA}:/<pfad-im-container>
- ${DIR_CONFIG}:/<config-pfad>:ro
networks:
- proxy
labels: # Traefik bleibt aus, bis TRAEFIK_ENABLE=true
- "traefik.enable=${TRAEFIK_ENABLE:-false}"
- "traefik.docker.network=${TRAEFIK_NETWORK:-traefik-net}"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${APP_FQDN:-${COMPOSE_PROJECT_NAME}.invalid}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls.certresolver=${TRAEFIK_CERTRESOLVER:-le}"
- "traefik.http.services.${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=${APP_INTERNAL_PORT:-80}"
logging: *default-logging
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:<intern>/<pfad>"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
networks:
proxy:
name: ${TRAEFIK_NETWORK:-traefik-net}
external: true