awesometic / docker-h5ai Goto Github PK
View Code? Open in Web Editor NEWLightweight h5ai 0.30.0 container with Nginx 1.21 & PHP 8 based on Alpine Linux.
License: Other
Lightweight h5ai 0.30.0 container with Nginx 1.21 & PHP 8 based on Alpine Linux.
License: Other
I don't want to use subdomain to serve it, instead add a custom path into url, such as https://example.com/share.
my nginx config is looks like:
location /share/ {
proxy_read_timeout 60m;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8000/;
}
location /_h5ai/ {
proxy_pass http://127.0.0.1:8000/h5ai;
}
It won't show files in browser, what am I wrong or something missing? please help me.
My understanding is that the _h5ai folder must be within the root directory of the files being indexed, however, this seems to not be a limitation with your docker image. Could you explain how this was done? Thanks.
Hi,
nice docker!, recommend to add resume download function
Thankyou
Title explains itself, I can't find a way to set up certbot properly. Is there any tutorial for how I'd go about doing it?
"search": {
"enabled": true,
"advanced": true,
"debounceTime": 300,
"ignorecase": true
},
"enabled": false, change true
Did not take effect, what should I do?
Hi, I was wondering on how to change the port since i have other things hosted on different ports that h5ai might be trying to use
Hardware: Raspberry Pi4
OS: Debian 11 (bullseye)
First of all, thank you for creating this repo! I have zero clue on how to work with PHP and was having a tough time trying to build a Docker image for h5ai!
I have been building arm64 images of your repo because I wanted to run them off of my Raspberry Pi. Building arm64 works out the box without any changes to your code. https://github.com/b-ggs/dockerfiles/runs/1914884700?check_suite_focus=true
I was wondering if you're interested in supporting arm64 or possible other architectures like arm32v7.
I can contribute but I don't think there's a fully supported way to do it with Docker cloud. I have mine set up with GitHub Actions. https://github.com/b-ggs/dockerfiles/blob/9b15759b2e6596e9ed7cc9aa713988047d63d7f8/.github/workflows/buildx.yml#L46
Hi,
Instead of implementing Let's encrypt inside this docker what about being compatible with a reverse proxy. e.g: https://github.com/linuxserver/docker-letsencrypt
Thanks
Hello there, I've recently replaced corfr/h5ai
with your container but have noticed that I no longer get thumbnails for webm files.
When I click them to preview the file fullscreen, it will work fine (at least in my browser, Firefox).
The error I'm getting via docker logs
when requested is as follows:
172.18.0.12 - - [11/Nov/2021:16:39:34 +0000] "GET directory/file.webm HTTP/1.1" 206 131147 "https://domain/directory/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0" "myip"
2021/11/11 16:43:17 [error] 41#41: *87 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36864 bytes) in /config/h5ai/_h5ai/private/php/ext/class-thumb.php on line 148" while reading response header from upstream, client: 172.18.0.12, server: _, request: "POST /directory/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "domain", referrer: "https://domain/directory/"
Hi, I just installed this image and everything worked fine, except for file preview thumbnails. I was able to fix this by editing the memory_limit
setting in /etc/php8/php.ini
to -1
(unlimited):
sed -i -e '/memory_limit =/ s/= .*/= -1/' /etc/php8/php.ini
If you think this should be the default value then I could PR this (what would be the appropriate step to perform this in? Dockerfile
or init.sh
?). Thanks!
Hereby I am running the image on my unRaid host and I wanted to add authentication when visiting. The docker config can be found below:
However, when I visit the WebUI, entering the credentials, Chrome kept popping up a new input box for me to re-enter (failed to login).
unRaid log:
192.168.11.2 - admin [13/Jul/2021:16:15:07 -0700] "GET / HTTP/1.1" 401 581 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36" "-"
2021/07/13 16:15:10 [error] 44#44: *2 user "admin" was not found in "/config/nginx/.htpasswd", client: 192.168.11.2, server: _, request: "GET / HTTP/1.1", host: "192.168.11.1:55555"
Was it a bug or my setup-side issue?
Hello,
Using the env variables PUID and PGID has no effect.
To replicate the issue:
/h5ai
If I instead chmod the mapped volume to 774, h5ai is able to see my files. As far as I know, the container should be able to see my files without chmoding the mapped volume to allow others to see them. Emby's image (https://hub.docker.com/r/linuxserver/emby) seems to manage that the right way.
not sure if h5ai is not compatible with rclone mount
docker-compose.yml
version: '3.5'
services:
h5ai:
image: awesometic/h5ai
container_name: h5ai
restart: unless-stopped
depends_on:
- rclone
logging:
options:
max-size: "10m"
max-file: "3"
env_file:
- .env
- .env.rclone
environment:
- TZ=${TZ}
- PUID=${PUID}
- PGID=${PGID}
ports:
- 5573:80
volumes:
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
- /etc/localtime:/etc/localtime:ro
- ./config/h5ai:/config
- /mnt/rclone/mnt:/h5ai:shared
Variables:
- PUID=1000
- PGID=1000
- TZ=Pacific/Auckland
- HTPASSWD=false
- HTPASSWD_USER=guest
- HTPASSWD_PW=
Make config directories...
useradd: cannot open /etc/passwd
groupmod: group 'abc' does not exist
usermod: user 'abc' does not exist
Add dummy user for better handle permission...
Check configuration files for Nginx...
User setup files found: /config/nginx/h5ai.conf
Remove image's default setup files and copy the previous version...
Check configuration files for h5ai...
User setup files found: /config/h5ai/_h5ai
Check if h5ai version updated...
Remove image's default setup files and copy the existing version...
Set permission for caching...
Fix ownership for Nginx and php-fpm...
Set ownership to the configuration files...
chown: unknown user/group abc:abc
Start supervisord...
2021-10-13 02:31:02,555 INFO Set uid to user 0 succeeded
2021-10-13 02:31:02,557 INFO supervisord started with pid 35
2021-10-13 02:31:03,561 INFO spawned: 'nginx' with pid 36
2021-10-13 02:31:03,565 INFO spawned: 'php-fpm' with pid 37
2021/10/13 02:31:03 [emerg] 36#36: getpwnam("abc") failed in /etc/nginx/nginx.conf:2
nginx: [emerg] getpwnam("abc") failed in /etc/nginx/nginx.conf:2
2021-10-13 02:31:03,620 INFO exited: nginx (exit status 1; not expected)
[13-Oct-2021 02:31:03] ERROR: [pool www] cannot get uid for user 'abc'
[13-Oct-2021 02:31:03] ERROR: FPM initialization failed
2021-10-13 02:31:03,634 INFO gave up: nginx entered FATAL state, too many start retries too quickly
2021-10-13 02:31:03,635 INFO exited: php-fpm (exit status 78; not expected)
2021-10-13 02:31:04,637 INFO gave up: php-fpm entered FATAL state, too many start retries too quickly
not an issue, this works great!
I use it to share photos with my family.
Anyway to add more unique users/passwords?
my env :
pi 3 B+
armv7 32
docker run -d --name=h5ai
-p 801:80
-v /mnt/usb_flash/Aria2/aria2-downloads:/h5ai/aria2-downloads
-v /mnt/usb_flash/resilio-sync:/h5ai/resilio-sync
-v /mnt/usb_flash/h5ai-config:/config
-e PUID=1000
-e PGID=1000
-e TZ=Asia/Shanghai
--restart unless-stopped
awesometic/h5ai
then I got some errors by logs and restart Automatically every 2 sec
logs:
Variables:
- PUID=1000
- PGID=1000
- TZ=Asia/Shanghai
- HTPASSWD=false
- HTPASSWD_USER=guest
- HTPASSWD_PW=
Configure timezone for PHP...
Make config directories...
Add dummy user for better handle permission...
Check configuration files for Nginx...
User setup files found: /config/nginx/h5ai.conf
Remove image's default setup files and copy the previous version...
Check configuration files for h5ai...
User setup files found: /config/h5ai/_h5ai
Check if h5ai version updated...
Remove image's default setup files and copy the existing version...
Set permission for caching...
Fix ownership for Nginx and php-fpm...
Set ownership to the configuration files...
Start supervisord...
Fatal Python error: init_interp_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted
Current thread 0x76f85390 (most recent call first):
Variables:
- PUID=1000
- PGID=1000
- TZ=Asia/Shanghai
- HTPASSWD=false
- HTPASSWD_USER=guest
- HTPASSWD_PW=
Make config directories...
Add dummy user for better handle permission...
useradd: user 'abc' already exists
usermod: no changes
Check configuration files for Nginx...
User setup files found: /config/nginx/h5ai.conf
Remove image's default setup files and copy the previous version...
Check configuration files for h5ai...
User setup files found: /config/h5ai/_h5ai
Check if h5ai version updated...
Remove image's default setup files and copy the existing version...
Set permission for caching...
Fix ownership for Nginx and php-fpm...
Set ownership to the configuration files...
Start supervisord...
Fatal Python error: init_interp_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted
what might be happened there and why ?
I have no idea about that....
thanks
is there any easy way to allow the container to open hardlinks or even symlinks?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.