Docker update for image issue

This commit is contained in:
2026-08-14 17:07:49 +05:30
parent 902eb74b28
commit 36a6582b5d
+12 -4
View File
@@ -22,10 +22,18 @@ services:
SERVER_FORWARD_HEADERS_STRATEGY: native
volumes:
# Persist uploaded images and files
# NOTE: production profile (application.yml) sets file.upload.directory to
# /var/uploads/blog-images — this mount MUST match that path or uploads
# silently write to the container's ephemeral layer and vanish on redeploy.
# Persist uploaded images and files.
# This same named volume is mounted at TWO paths on purpose:
# - /app/uploads: hardcoded in FileConstant.java for hero/professor/
# user avatar images (does NOT read file.upload.directory).
# - /var/uploads/blog-images: read from file.upload.directory
# (application.yml production profile) for blog post images.
# The volume already contains hero/ and user/ subfolders plus the
# blog post images at its root from before this was mounted twice —
# mounting both paths makes all of it visible again with no data
# migration needed. Do not change either path without updating the
# other or the corresponding app config.
- blog-uploads:/app/uploads
- blog-uploads:/var/uploads/blog-images
networks:
- angular-spring