diff --git a/Dockerfile b/Dockerfile index cbadc74..b8e0949 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,12 +21,11 @@ RUN \ # install ubooquity mkdir -p \ - /opt/ubooquity \ - /opt/ubooquity/fonts && \ + /app/ubooquity && \ curl -o \ /tmp/ubooquity.zip -L \ "http://vaemendis.net/ubooquity/downloads/Ubooquity-${UBOOQUITY_VER}.zip" && \ - unzip /tmp/ubooquity.zip -d /opt/ubooquity && \ + unzip /tmp/ubooquity.zip -d /app/ubooquity && \ # cleanup apk del --purge \ @@ -38,5 +37,5 @@ RUN \ COPY root/ / # ports and volumes -EXPOSE 2202 2205 +EXPOSE 2202 2203 VOLUME /books /comics /config /files diff --git a/README.md b/README.md index 5a18e62..252ce98 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ docker create \ -e MAXMEM= \ -e PGID= -e PUID= \ -p 2202:2202 \ - -p 2205:2205 \ + -p 2203:2203 \ linuxserver/ubooquity ``` @@ -45,7 +45,7 @@ http://192.168.x.x:8080 would show you what's running INSIDE the container on po * `-p 2202` - the library port -* `-p 2205` - the admin port +* `-p 2203` - the admin port * `-v /config` - Config files and database for ubooquity * `-v /books` - Location of books. * `-v /comics` - Location of comics. @@ -80,9 +80,9 @@ In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as bel This container will automatically scan your files at startup. **IMPORTANT** -Access the admin page at `http://:2205/ubooquity/admin/` and set a password. +Access the admin page at `http://:2203/ubooquity/admin/` and set a password. -Then you can access the webui at `http://:2205/ubooquity/` +Then you can access the webui at `http://:2203/ubooquity/` ## Info diff --git a/root/defaults/preferences.json b/root/defaults/preferences.json new file mode 100644 index 0000000..040f9fd --- /dev/null +++ b/root/defaults/preferences.json @@ -0,0 +1,47 @@ +{ + "filesPaths" : [ { + "pathString" : "/files", + "userName" : [ ] + } ], + "comicsPaths" : [ { + "pathString" : "/comics", + "userName" : [ ] + } ], + "booksPaths" : [ { + "pathString" : "/books", + "userName" : [ ] + } ], + "users" : [ ], + "isFilesProviderEnabled" : true, + "isComicsProviderEnabled" : true, + "isBooksProviderEnabled" : true, + "isUserManagementEnabled" : false, + "libraryPortNumber" : 2202, + "adminPortNumber" : 2203, + "comicWidth" : 160, + "comicHeight" : 230, + "comicsPaginationNumber" : 30, + "bookWidth" : 160, + "bookHeight" : 230, + "booksPaginationNumber" : 30, + "minimizeToTray" : false, + "minimizeOnStartup" : false, + "autoscanPeriod" : 0, + "isRemoteAdminEnabled" : false, + "theme" : "default", + "isShrinkingCacheEnabled" : false, + "shrunkPageWidth" : 1536, + "shrunkPageHeight" : 2500, + "shrinkingCachePath" : "", + "autoScanAtLaunch" : true, + "reverseProxyPrefix" : "", + "keystorePath" : "", + "keystorePassword" : "", + "isOpdsProviderEnabled" : false, + "folderExclusionPattern" : "", + "bypassSingleRootFolder" : false, + "enableFolderMetadataDisplay" : false, + "bookmarkUsingCookies" : false, + "displayTitleInsteadOfFileName" : false, + "keepUnreachableSharedFolders" : false +} \ No newline at end of file diff --git a/root/defaults/preferences.xml b/root/defaults/preferences.xml deleted file mode 100644 index 37fc999..0000000 --- a/root/defaults/preferences.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - /comics - - - - - - /books - - - - - true - true - true - false - 2202 - 160 - 230 - 30 - 160 - 230 - 30 - false - false - 0 - false - Default - false - 1536 - 2400 - - true - ubooquity - - - true - false - - false - false - diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index c1b300e..1a4425d 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -4,11 +4,11 @@ mkdir -p \ config/fonts -# copy config -[[ ! -e /config/preferences.xml ]] && \ - cp /defaults/preferences.xml /config/preferences.xml +# copy config +[[ ! -e /config/preferences.json ]] && \ + cp /defaults/preferences.json /config/preferences.json # permissions chown -R abc:abc \ /config \ - /opt/ubooquity + /app/ubooquity diff --git a/root/etc/services.d/ubooquity/run b/root/etc/services.d/ubooquity/run index 072736f..3246cf4 100644 --- a/root/etc/services.d/ubooquity/run +++ b/root/etc/services.d/ubooquity/run @@ -2,12 +2,11 @@ JAVAMEM=${MAXMEM:-512} -cd /opt/ubooquity || exit +cd /app/ubooquity || exit exec \ s6-setuidgid abc java -Xmx"$JAVAMEM"m \ - -jar /opt/ubooquity/Ubooquity.jar \ + -jar /app/ubooquity/Ubooquity.jar \ --headless --host 0.0.0.0 \ - --libraryport 2202 --adminport 2205 \ --remoteadmin \ --workdir /config