Upload bild

This commit is contained in:
Timo Knuth
2026-04-30 17:09:43 +02:00
parent 00bff3bcf7
commit f27b536a23
2 changed files with 22 additions and 8 deletions

View File

@@ -19,9 +19,22 @@ else
fi
echo "NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:-[not set]}"
echo "NODE_ENV: ${NODE_ENV:-[not set]}"
echo "UPLOAD_DIR: ${UPLOAD_DIR:-/app/uploads}"
echo "========================================"
echo ""
UPLOAD_DIR="${UPLOAD_DIR:-/app/uploads}"
if ! mkdir -p "$UPLOAD_DIR"; then
echo "ERROR: Could not create upload directory: $UPLOAD_DIR"
exit 1
fi
if ! [ -w "$UPLOAD_DIR" ]; then
echo "ERROR: Upload directory is not writable by uid $(id -u):gid $(id -g): $UPLOAD_DIR"
echo "Use the docker-compose uploads_data volume or fix ownership on the mounted directory."
exit 1
fi
run_with_retries() {
attempt=1
max_attempts=20

View File

@@ -67,9 +67,9 @@ services:
pids_limit: 512
ulimits:
nproc: 65535
volumes:
# Uploaded files persists across restarts
- ./uploads:/app/uploads
volumes:
# Uploaded files - persisted in a Docker-managed volume so ownership stays writable for the nextjs user.
- uploads_data:/app/uploads
networks:
- innungsapp # <-- NEU
healthcheck:
@@ -79,9 +79,10 @@ services:
retries: 3
start_period: 40s
volumes:
pg_data:
networks:
volumes:
pg_data:
uploads_data:
networks:
innungsapp:
external: true
external: true