slight reorganization

This commit is contained in:
Daniel Wolf 2018-06-01 21:24:52 -04:00
parent 6b1f2ca16c
commit f25497debb
2 changed files with 14 additions and 14 deletions

View File

@ -1,13 +1,17 @@
FROM nephatrine/base-php7:latest
LABEL maintainer="Daniel Wolf <nephatrine@gmail.com>"
RUN echo "====== NOT MUCH TO DO ======" \
RUN echo "====== RUNTIME CONFIGURATION ======" \
&& apk --update upgrade \
&& apk add ffmpeg imagemagick zip \
&& apk add \
ffmpeg \
imagemagick \
zip \
&& mkdir -p /mnt/media \
\
&& echo "====== PREPARE BUILD TOOLS ======" \
&& apk add --virtual .build-h5ai nodejs-npm \
&& echo "====== BUILD CONFIGURATION ======" \
&& apk add --virtual .build-h5ai \
nodejs-npm \
\
&& echo "====== INSTALL H5AI ======" \
&& cd /usr/src \
@ -18,7 +22,7 @@ RUN echo "====== NOT MUCH TO DO ======" \
&& echo "====== CONFIGURE NGINX ======" \
&& sed -i 's~index.html~index.html /_h5ai/public/index.php~g' /etc/nginx/nginx.conf \
\
&& echo "====== CONFIGURE PHP ======" \
&& echo "====== CONFIGURE PHP-FPM ======" \
&& sed -i 's~/mnt/config/www/~/mnt/config/www/:/mnt/media/~g' /etc/php/php-fpm.d/www.conf \
\
&& echo "====== CLEANUP ======" \

View File

@ -6,21 +6,17 @@
This docker runs the [H5AI](https://larsjung.de/h5ai/) web directory index. Just put files and folders into the volume mapped to `/mnt/media` and they will be made accessible through the web interface. For private files, you can either lock them down via the NGINX config (there's an example that will hide files under /local/) or use a separate docker that is not publicly accessible in the first place.
Configure it by editing `/_h5ai/private/conf/options.json` in the media volume. I suggest disabling custom headers and footers as it will cause a lot of open_basedir errors in the PHP logs. **Remember to change the password** because the info page might expose information about your server that you do not want exposed.
Configure it by editing ``{media}/_h5ai/private/conf/options.json`` in the media volume. I suggest disabling custom headers and footers as it will cause a lot of open_basedir errors in the PHP logs. **Remember to change the password** because the info page might expose information about your server that you do not want exposed.
Certbot (LetsEncrypt) is installed to handle obtaining SSL certs in case this is your only web docker. If you plan on hosting multiple applications/dockers, though I suggest having one [nginx-ssl](https://hub.docker.com/r/nephatrine/nginx-ssl/) docker that is publicly visible and handles the SSL certs for all domains. That docker can then proxy all your other nginx dockers which would actually be running on non-public IPs under plain HTTP.
## Settings
- **ADMINIP:** Administrative Access IP
- **DNSADDR:** Resolver IPs (Space-Delimited)
- **PUID:** Volume Owner UID
- **PGID:** Volume Owner GID
- **SSLEMAIL:** LetsEncrypt Email Address
- **SSLDOMAINS:** LetsEncrypt (Sub)domains (comma-delimited)
- **TZ:** Time Zone
See the [base image](https://github.com/nephatrine/docker-nginx-ssl) for additional settings.
## Mount Points
- **/mnt/config:** Configuration Volume
- **/mnt/media:** Files/Data Volume
- **/mnt/media:** Files/Data Volume
The media mountpoint will have an `_h5ai` folder created in it, but otherwise will not be modified.