Hi.Events icon indicating copy to clipboard operation
Hi.Events copied to clipboard

🐛Docker configuration doesn't mount storage properly.

Open scracha opened this issue 5 months ago • 2 comments

Describe the bug Uploaded Images and logos result in broken URLs when displaying.

To Reproduce Steps to reproduce the behavior:

  1. Create an event and add a logo or image
  2. Share the event URL. Open incognito tab. Images in the event result in 404 not found.
  3. After docker container is restarted, the images no longer show in the event administration.

** ISSUE ** Docker configuration for Hi.Events (all-in-one) doesn't declare a persistent volume mount for storage directory /app/backend/storage

*** FIX ***

a) Host NGINX config

/etc/nginx/sites-available/SITE_URL

location /storage/ {
    proxy_pass http://127.0.0.1:8123;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

b) Added a volume block (appdata) in the docker config

/opt/hievents/docker/all-in-one/docker-compose.yml

services:
  all-in-one:
    # ... other configurations ...
    volumes:
      - appdata:/app/backend/storage

volumes:
  pgdata:
  redisdata:
  appdata:

c) Root owned directories

# Recreate directory scaffolds inside the persistence layer
mkdir -p storage/app/public/generic storage/app/public/ticket_logo

# Fix invalid broken symlink 
rm -f public/storage
php artisan storage:link

# prevent www-data/nginx execution lockouts
chmod -R 777 storage/app/public

Hi.Events Version and platform Self hosted docker running on - Ubuntu 26.04 .

scracha avatar Jul 02 '26 04:07 scracha

A useful next step would be a minimal fixture for 🐛Docker configuration doesn't mount storage properly. that includes one failing input and one nearby control case. That would make it clear whether the fix addresses the reported edge case without widening behavior unexpectedly. opt/hievents/docker/all-in-one/docker-compose.yml is a useful concrete anchor because it is named directly in the report.

hiSandog avatar Jul 09 '26 03:07 hiSandog

Status: These changes are local and uncommitted; they have not been merged or released.

The all-in-one Compose configuration now persists application storage in a named volume. The deployment guide explains public storage URLs, reverse-proxy forwarding, backups, and how to migrate files from an existing container before replacing it.

Isolated persistence/migration checks and a Laravel image-storage/browser smoke test passed. The complete all-in-one image was not rebuilt for this verification.

No screenshot is attached here; supporting evidence is being prepared separately for manual upload.

chmunyas avatar Oct 31 '26 10:10 chmunyas