Ergänze Deploy-Gerüst und verweise die Agentenregeln auf CLAUDE.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-15 08:14:57 +01:00
1 parent ec009a187b
commit 89b35ac480
18 files changed
+880

No files matched your search

+122
View File
@@ -0,0 +1,122 @@
# LUF – Compose für Test und Produktion. Der Unterschied liegt nur in Projektname, Env-Datei und Web-Port,
# die das Deploy-Skript setzt (scripts/deploy.sh). Es gibt keine festen Host-Ports außer dem Web-Port.
#
# Pflicht-Variablen (vom Skript exportiert): LUF_ENV (test|prod), LUF_TAG, LUF_ENV_FILE, LUF_WEB_PORT
# Medien: LUF_MEDIA_HOST (setzt das Deploy-Skript auf /srv/luf/<env>/media, NFS-Mount vom NAS) mit den Unterordnern
# originals/ nur queue (lesen+schreiben); der Web-Prozess (app) hat KEINEN Zugriff (Architektur 03/08)
# derived/ queue schreibt, app liest nur (private Ableitungen, Auslieferung nur über Signatur)
# public/ queue schreibt, app liest nur (bewusst öffentliche Medien)
# Pflicht in der Env-Datei: DB_DATABASE, DB_USERNAME, DB_PASSWORD (siehe deploy/luf.env.example)
x-logging: &logging
driver: json-file
options:
max-size: "10m"
max-file: "3"
services:
db:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_DATABASE:?DB_DATABASE fehlt}
POSTGRES_USER: ${DB_USERNAME:?DB_USERNAME fehlt}
POSTGRES_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD fehlt}
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 20
logging: *logging
app:
build:
context: .
target: app
image: luf-app-${LUF_ENV:?}:${LUF_TAG:?}
restart: unless-stopped
env_file: ${LUF_ENV_FILE:?}
environment:
DB_HOST: db
DB_PORT: "5432"
volumes:
- storage-data:/var/www/html/storage
- type: bind
source: ${LUF_MEDIA_HOST:?}/derived
target: /media/derived
read_only: true
bind:
create_host_path: false
- type: bind
source: ${LUF_MEDIA_HOST:?}/public
target: /media/public
read_only: true
bind:
create_host_path: false
depends_on:
db:
condition: service_healthy
logging: *logging
web:
build:
context: .
target: web
image: luf-web-${LUF_ENV:?}:${LUF_TAG:?}
restart: unless-stopped
ports:
- "${LUF_WEB_PORT:?}:80"
depends_on:
- app
logging: *logging
queue:
image: luf-app-${LUF_ENV:?}:${LUF_TAG:?}
restart: unless-stopped
command: ["php", "artisan", "queue:work", "--tries=3", "--max-time=3600"]
env_file: ${LUF_ENV_FILE:?}
environment:
DB_HOST: db
DB_PORT: "5432"
volumes:
- storage-data:/var/www/html/storage
- type: bind
source: ${LUF_MEDIA_HOST:?}/originals
target: /media/originals
bind:
create_host_path: false
- type: bind
source: ${LUF_MEDIA_HOST:?}/derived
target: /media/derived
bind:
create_host_path: false
- type: bind
source: ${LUF_MEDIA_HOST:?}/public
target: /media/public
bind:
create_host_path: false
depends_on:
db:
condition: service_healthy
logging: *logging
scheduler:
image: luf-app-${LUF_ENV:?}:${LUF_TAG:?}
restart: unless-stopped
command: ["php", "artisan", "schedule:work"]
env_file: ${LUF_ENV_FILE:?}
environment:
DB_HOST: db
DB_PORT: "5432"
volumes:
- storage-data:/var/www/html/storage
depends_on:
db:
condition: service_healthy
logging: *logging
volumes:
db-data:
storage-data: