From cf62b213dcf8cce04a1326da8dba985c6a4c0513 Mon Sep 17 00:00:00 2001 From: Jean Froment Date: Mon, 6 Mar 2017 22:29:00 +0100 Subject: [PATCH] Add h5ai --- Dockerfiles/frontend/nginx.conf | 10 ++++++++++ Dockerfiles/h5ai/Dockerfile | 33 +++++++++++++++++++++++++++++++++ README.md | 2 ++ build-all.sh | 1 + docker-compose.yml | 14 ++++++++++++++ push-images.sh | 2 ++ 6 files changed, 62 insertions(+) create mode 100644 Dockerfiles/h5ai/Dockerfile diff --git a/Dockerfiles/frontend/nginx.conf b/Dockerfiles/frontend/nginx.conf index 9da35e4..4ec88dd 100644 --- a/Dockerfiles/frontend/nginx.conf +++ b/Dockerfiles/frontend/nginx.conf @@ -57,6 +57,16 @@ http { } } + server { + include common.conf; + server_name ~^(explore)(\.\w+)+$; + + location / { + set $h5ai http://h5ai:12333; + proxy_pass $h5ai; + } + } + server { include common.conf; server_name ~^(plex)(\.\w+)+$; diff --git a/Dockerfiles/h5ai/Dockerfile b/Dockerfiles/h5ai/Dockerfile new file mode 100644 index 0000000..6de7862 --- /dev/null +++ b/Dockerfiles/h5ai/Dockerfile @@ -0,0 +1,33 @@ +FROM ubuntu:14.04 +MAINTAINER Jean Froment + +ENV DEBIAN_FRONTEND noninteractive +ENV H5AI_VERSION 0.29.0 +ENV HTTPD_USER www-data + +RUN apt-get update && apt-get install -y \ + nginx php5-fpm supervisor \ + wget unzip patch acl \ + libav-tools imagemagick \ + graphicsmagick zip unzip php5-gd + +# install h5ai and patch configuration +RUN wget http://release.larsjung.de/h5ai/h5ai-$H5AI_VERSION.zip +RUN unzip h5ai-$H5AI_VERSION.zip -d /usr/share/h5ai + +# patch h5ai because we want to deploy it ouside of the document root and use /var/www as root for browsing +COPY class-setup.php.patch class-setup.php.patch +RUN patch -p1 -u -d /usr/share/h5ai/_h5ai/private/php/core/ -i /class-setup.php.patch && rm class-setup.php.patch + +RUN rm /etc/nginx/sites-enabled/default + +#make the cache writable +RUN chown ${HTTPD_USER} /usr/share/h5ai/_h5ai/public/cache/ +RUN chown ${HTTPD_USER} /usr/share/h5ai/_h5ai/private/cache/ + +# use supervisor to monitor all services +COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf +CMD supervisord -c /etc/supervisor/conf.d/supervisord.conf + +# expose only nginx HTTP port +EXPOSE 12333 \ No newline at end of file diff --git a/README.md b/README.md index 008b21c..3f91226 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,11 @@ seedbox and personal media server. Go to `x.hostname` where `x` is the service you want to access. Included services are: - rtorrent +- deluge (supposed to replace rtorrent someday, seems to be more compatible with sonarr) - sonarr - jackett (included in the sonarr image) - plex +- h5ai The front-end reverse proxy routes based on the lowest level subdomain (e.g. `rtorrent.example.com` would route to rtorrent). Since this is how the router diff --git a/build-all.sh b/build-all.sh index a285f59..c35bfe2 100755 --- a/build-all.sh +++ b/build-all.sh @@ -27,5 +27,6 @@ docker build -t fromenje/seedbox:plex $ARGS Dockerfiles/plex & docker build -t fromenje/seedbox:rtorrent $ARGS Dockerfiles/rtorrent & docker build -t fromenje/seedbox:deluge $ARGS Dockerfiles/deluge & docker build -t fromenje/seedbox:sonarr $ARGS Dockerfiles/sonarr & +docker build -t fromenje/seedbox:h5ai $ARGS Dockerfiles/h5ai & wait diff --git a/docker-compose.yml b/docker-compose.yml index 98e4349..9678328 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -53,6 +53,20 @@ services: env_file: - config + h5ai: + image: fromenje/seedbox:h5ai + build: Dockerfiles/h5ai + restart: always + networks: + - main + ports: + - "12333:12333" + volumes: + - torrents:/var/www + - config:/config + env_file: + - config + plex: image: fromenje/seedbox:plex build: Dockerfiles/plex diff --git a/push-images.sh b/push-images.sh index caa37be..937eb8f 100755 --- a/push-images.sh +++ b/push-images.sh @@ -6,3 +6,5 @@ docker push fromenje/seedbox:frontend docker push fromenje/seedbox:plex docker push fromenje/seedbox:rtorrent docker push fromenje/seedbox:sonarr +docker push fromenje/seedbox:deluge +docker push fromenje/seedbox:h5ai