Skip to content

🐛Docker configuration doesn't mount storage properly. #1238

Description

@scracha

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 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions