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>
49 lines
1.9 KiB
YAML
49 lines
1.9 KiB
YAML
#-------------------------------------------------------------------------------
|
||
## @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
|