diff --git a/papermerge/Dockerfile b/papermerge/Dockerfile new file mode 100644 index 000000000..01e8d52b0 --- /dev/null +++ b/papermerge/Dockerfile @@ -0,0 +1,28 @@ +ARG BUILD_FROM +ARG BUILD_VERSION + +FROM ${BUILD_FROM}${BUILD_VERSION} + +# Add bashio +#RUN apk add --no-cache \ +# curl \ +# jq \ +# && curl -J -L -o /tmp/bashio.tar.gz \ +# "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \ +# && mkdir /tmp/bashio \ +# && tar zxvf \ +# /tmp/bashio.tar.gz \ +# --strip 1 -C /tmp/bashio \ +# \ +# && mv /tmp/bashio/lib /usr/lib/bashio \ +# && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ +# && rm -fr /tmp/bashio.tar.gz + +# Copy root filesystem +# COPY rootfs / + +# MOFIFY DATA PATH +RUN sed -i "s|/data/media|/share/papermerge/media|g" /defaults/papermerge.conf.py \ + && sed -i "s|/app/papermerge/static|/share/papermerge/static|g" /defaults/papermerge.conf.py + +VOLUME [ "/data" "/share" ] diff --git a/papermerge/README.md b/papermerge/README.md new file mode 100644 index 000000000..92e8f89ff --- /dev/null +++ b/papermerge/README.md @@ -0,0 +1,31 @@ +# Home assistant add-on: Transmission +![Supports aarch64 Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armhf Architecture][armhf-shield] ![Supports armv7 Architecture][armv7-shield] + +## About + +Open source document management system (DMS) +This addon is based on the [docker image](https://hub.docker.com/r/linuxserver/papermerge) from linuxserver.io. + +## Installation + +The installation of this add-on is pretty straightforward and not different in +comparison to installing any other Hass.io add-on. + +1. [Add my Hass.io add-ons repository][repository] to your Hass.io instance. +1. Install this add-on. +1. Click the `Save` button to store your configuration. +1. Start the add-on. +1. Check the logs of the add-on to see if everything went well. +1. Carefully configure the add-on to your preferences, see the official documentation for for that. + +## Configuration + +Default login is admin:admin via the webui, accessible at http://SERVERIP:PORT + +Webui can be found at `:8000`. + +[repository]: https://github.com/alexbelgium/hassio-addons +[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg +[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg +[armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg +[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg diff --git a/papermerge/build.json b/papermerge/build.json new file mode 100644 index 000000000..7cf525e71 --- /dev/null +++ b/papermerge/build.json @@ -0,0 +1,9 @@ +{ + "build_from": { + "armv7": "linuxserver/papermerge:arm32v7-version-v", + "armhf": "linuxserver/papermerge:arm32v7-version-v", + "aarch64": "linuxserver/papermerge:arm64v8-version-v", + "amd64": "linuxserver/papermerge:amd64-version-v" + } +} + diff --git a/papermerge/config.json b/papermerge/config.json new file mode 100644 index 000000000..4aa0ff395 --- /dev/null +++ b/papermerge/config.json @@ -0,0 +1,38 @@ +{ + "name": "Papermerge", + "version": "1.5.5", + "slug": "papermerge", + "description": "Open source document management system (DMS)", + "url": "https://hub.docker.com/r/linuxserver/papermerge", + "arch": [ + "aarch64", + "amd64", + "armv7", + "armhf" + ], + "ports": { + "8000/tcp": 8000 + }, + "ports_description": { + "9000/tcp": "Web UI port (required)" + }, + "map": [ + "config:rw", + "share:rw", + "media:rw", + "ssl" + ], + "webui": "http://[HOST]:[PORT:8000]", + "boot": "auto", + "environment": { + }, + "options": { + "PUID": 1000, + "PGID": 1000 + }, + "schema": { + "PUID": "int", + "PGID": "int", + "TZ": "str?" + } +} diff --git a/papermerge/icon.png b/papermerge/icon.png new file mode 100644 index 000000000..89a4a1d91 Binary files /dev/null and b/papermerge/icon.png differ diff --git a/papermerge/logo.png b/papermerge/logo.png new file mode 100644 index 000000000..89a4a1d91 Binary files /dev/null and b/papermerge/logo.png differ diff --git a/papermerge/rootfs/etc/cont-init.d/50-mounts.sh b/papermerge/rootfs/etc/cont-init.d/50-mounts.sh new file mode 100644 index 000000000..0bb2a5c57 --- /dev/null +++ b/papermerge/rootfs/etc/cont-init.d/50-mounts.sh @@ -0,0 +1,21 @@ +#!/usr/bin/with-contenv bashio +bashio::log.info 'Mounting external hdd...' + +# Mount local Share if configured and if Protection Mode is active +if bashio::config.has_value 'localdisks'; then + MOREDISKS=$(bashio::config 'localdisks') + bashio::log.info "Local Disks mounting.. ${MOREDISKS}" && \ + for disk in $MOREDISKS + do + bashio::log.info "Mount ${disk}" + mkdir -p /share/$disk && \ + if [ ! -d /share/$disk ]; then + echo "Creating /share/$disk" + mkdir -p /share/$disk + chown -R abc:abc /share/$disk + fi + mount /dev/$disk /share/$disk && \ + bashio::log.info "Success!" + done || \ + bashio::log.warning "Protection mode is ON. Unable to mount local drives!" +fi \ No newline at end of file