mriedmann / humhub-docker

Alpine-based PHP-FPM and NGINX HumHub docker-container
MIT License
95 stars 77 forks source link

themes and assets directories not writable #314

Closed thomai closed 1 year ago

thomai commented 1 year ago

I have a problem with the following docker-compose file (major change compared to the compose file in this repo is that I use local folders as volumes):

docker-compose.yml (click for code) ```docker-compose.yml version: '3.1' services: humhub: image: docker.io/mriedmann/humhub:latest ports: - "8080:80" env_file: - ./settings_humhub.env volumes: - "./volumes/uploads:/var/www/localhost/htdocs/uploads" - "./volumes/assets:/var/www/localhost/htdocs/assets" - "./volumes/modules:/var/www/localhost/htdocs/protected/modules" - "./volumes/themes:/var/www/localhost/htdocs/themes" - "./volumes/config:/var/www/localhost/htdocs/protected/config" - "./volumes/runtime:/var/www/localhost/htdocs/protected/runtime" healthcheck: test: ["CMD", "curl", "-f", "http://localhost/ping"] interval: 30s timeout: 10s retries: 3 db: image: mariadb:latest env_file: - ./settings_db.env volumes: - "./volumes/mysql:/var/lib/mysql" healthcheck: test: ["CMD", "mysqladmin", "ping", "--silent"] interval: 30s timeout: 10s retries: 3 mailer: image: sj26/mailcatcher:latest restart: always expose: - 1025 ports: - "1080:1080" redis: image: redis:5.0-alpine expose: - '6379' env_file: - ./settings_redis.env healthcheck: test: ["CMD", "redis-cli", "ping"] ```

When I start up the containers, the logs of the humhub container state that the assets folder does not have the right permissions:

The directory is not writable by the Web process: /var/www/localhost/htdocs/assets in /var/www/l
ocalhost/htdocs/protected/vendor/yiisoft/yii2/web/AssetManager.php:242

I assume this could be fixed by explicitly setting the user and group ownership in the entrypoint script. For me, it works after executing the following command when the error pops up in the logs: chown 100:101 ./volumes/assets

After setting the right permissions, the login works but no Humhub theme can be found in ./volumes/themes. I assume this is also a permission problem but I was not able to solve this. I got it working only after downloading the official Humhub release and moving the themes folder to the volume. Afterwards, the default Humhub theme appears in the administration interface and I was able to switch it on.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.