Giter Site home page Giter Site logo

aetaf / docker-h5ai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from awesometic/docker-h5ai

0.0 1.0 0.0 2.04 MB

Lightweight h5ai 0.29.2 container with Nginx 1.17 & PHP 7 based on Alpine Linux.

License: Other

Dockerfile 1.91% PHP 93.20% Shell 4.89%

docker-h5ai's Introduction

docker-h5ai

What is h5ai

I'd like to quote the official website.

h5ai is a modern file indexer for HTTP web servers with focus on your files. Directories are displayed in a appealing way and browsing them is enhanced by different views, a breadcrumb and a tree overview. Initially h5ai was an acronym for HTML5 Apache Index but now it supports other web servers too.

What this project provided for

I hope this project would be useful for those who uses docker for building their server.

Features

Core packages

I chose Alpine Linux for make it a light-weight service.
And I do choose nginx-alpine as its base image for the sake of some tweaks of Nginx version.

So this is composed of,

  • Alpine Linux 3.10.x
  • Nginx 1.17.x
  • PHP 7.3.x

with,

  • h5ai 0.29.2

'x' at the last of their version means that they could be upgraded by their maintainer.

And I use supervisor to manage these processes. Especially, PHP-FPM7.
This is the first time for me for using supervisor so I couldn't sure it is needed, but it looks just works. If you have any ideas, please let me know :)

All functions work

all functions work h5ai supports extensional functions such as showing thumnails of audio and video, caching for better speed, etc. This image functions all of them.

How can I use this

First of all, it assumes that you have installed Docker on your system.
Pull the image from docker hub.

docker pull awesometic/h5ai

Run that image temporary. '--rm' option removes container when you terminate the interactive session.

Basic usage

You can just dry run it out as the following commands.

docker run -it --rm \
-p 80:80 \
-v /wherever/you/share:/h5ai \
-v /wherever/you/config:/config \
-e TZ=Asia/Seoul \
awesometic/h5ai

If you want to run this image as a daemon, try to the followings.

docker run -d --name=h5ai \
-p 80:80 \
-v /wherever/you/share:/h5ai \
-v /wherever/you/config:/config \
-e TZ=Asia/Seoul \
awesometic/h5ai

If you want to login to visit h5ai websites so that prevents from accessing of anonymous users, just add an environments like the below.

docker run -it --name=h5ai \
-p 80:80 \
-v /wherever/you/share:/h5ai \
-v /wherever/you/config:/config \
-e TZ=Asia/Seoul \
-e HTPASSWD=true \
-e HTPASSWD_USER=awesometic \
awesometic/h5ai

Be aware of that HTPASSWD must be true for authenticating and that you have to run in interaction mode by adding -it to enter password for the new created user.

Then when the container runs, just let your browser browses:

http://localhost/

Sample files from https://www.sample-videos.com/ Then you can see the directories you shared.

TODOs

  • Easy access to options.json
  • Access permission using htpasswd
  • Support HTTPS - This image doesn't support SSL even if the generated cert files are preprared but you can apply SSL if you have external Let's Encrypt program and/or a reverse proxy server.

License

This project comes with MIT license. Please see the license file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.