1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
"use strict";(self.webpackChunkthreetwo_docs=self.webpackChunkthreetwo_docs||[]).push([[813],{3905:function(e,n,t){t.d(n,{Zo:function(){return p},kt:function(){return d}});var o=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function i(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){r(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function l(e,n){if(null==e)return{};var t,o,r=function(e,n){if(null==e)return{};var t,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=o.createContext({}),c=function(e){var n=o.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},p=function(e){var n=c(e.components);return o.createElement(s.Provider,{value:n},e.children)},m={inlineCode:"code",wrapper:function(e){var n=e.children;return o.createElement(o.Fragment,{},n)}},u=o.forwardRef((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(t),d=r,h=u["".concat(s,".").concat(d)]||u[d]||m[d]||a;return t?o.createElement(h,i(i({ref:n},p),{},{components:t})):o.createElement(h,i({ref:n},p))}));function d(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,i=new Array(a);i[0]=u;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var c=2;c<a;c++)i[c]=t[c];return o.createElement.apply(null,i)}return o.createElement.apply(null,t)}u.displayName="MDXCreateElement"},5001:function(e,n,t){t.r(n),t.d(n,{assets:function(){return s},contentTitle:function(){return i},default:function(){return m},frontMatter:function(){return a},metadata:function(){return l},toc:function(){return c}});var o=t(3117),r=(t(7294),t(3905));const a={sidebar_position:2,id:"unRAID_dockercompose",title:"Install ThreeTwo! on unRAID with the docker-compose plugin"},i=void 0,l={unversionedId:"unRAID_dockercompose",id:"unRAID_dockercompose",title:"Install ThreeTwo! on unRAID with the docker-compose plugin",description:"Notes",source:"@site/docs/unraid_dockercompose.md",sourceDirName:".",slug:"/unRAID_dockercompose",permalink:"/threetwo-docs/docs/unRAID_dockercompose",draft:!1,editUrl:"https://github.com/facebook/docusaurus/edit/main/website/docs/unraid_dockercompose.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2,id:"unRAID_dockercompose",title:"Install ThreeTwo! on unRAID with the docker-compose plugin"},sidebar:"tutorialSidebar",previous:{title:"Introduction",permalink:"/threetwo-docs/docs/intro"},next:{title:"Install ThreeTwo! on unRaid",permalink:"/threetwo-docs/docs/unraid_install"}},s={},c=[{value:"Notes",id:"notes",level:3},{value:"Pre-requisites",id:"pre-requisites",level:3},{value:"Installation",id:"installation",level:3},{value:"Ports",id:"ports",level:3},{value:"Getting Updates",id:"getting-updates",level:3}],p={toc:c};function m(e){let{components:n,...t}=e;return(0,r.kt)("wrapper",(0,o.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h3",{id:"notes"},"Notes"),(0,r.kt)("p",null,"This guide goes over ThreeTwo! installation on unRAID using the ",(0,r.kt)("a",{parentName:"p",href:"https://forums.unRAID.net/topic/114415-plugin-docker-compose-manager/"},"docker-compose manager")," plugin. Currently, this is the recommended approach for unRAID users."),(0,r.kt)("p",null,"With the help of this plugin, you are able to pull the entire ThreeTwo! ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose")," stack up, down with the click of a button. It abstracts away a lot of complexity associated with writing out commands in the console."),(0,r.kt)("p",null,"That said, the plugin is still in beta, so you may experience strange behavior. "),(0,r.kt)("h3",{id:"pre-requisites"},"Pre-requisites"),(0,r.kt)("p",null,"First things first, let's go over what the pre-requisites are:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"The ",(0,r.kt)("inlineCode",{parentName:"p"},"docker-compose")," configuration for ThreeTwo! now resides in its own repo here: ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/rishighan/threetwo-docker-compose"},"https://github.com/rishighan/threetwo-docker-compose")," You will be using this as reference.")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"A working ",(0,r.kt)("inlineCode",{parentName:"p"},"AirDC++")," install is necessary for ",(0,r.kt)("inlineCode",{parentName:"p"},"DC++")," searching/downloading to work. You can install it through the unRAID via the CA store or via a ",(0,r.kt)("a",{parentName:"p",href:"https://airdcpp.net/download#linux-nas-docker-other"},"docker"))),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},(0,r.kt)("inlineCode",{parentName:"p"},"comics")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"userdata")," folders."),(0,r.kt)("ol",{parentName:"li"},(0,r.kt)("li",{parentName:"ol"},"The ",(0,r.kt)("inlineCode",{parentName:"li"},"comics")," folder ",(0,r.kt)("em",{parentName:"li"},"must")," be the folder ",(0,r.kt)("inlineCode",{parentName:"li"},"AirDC++")," downloads comics to."),(0,r.kt)("li",{parentName:"ol"},"Create the ",(0,r.kt)("inlineCode",{parentName:"li"},"userdata")," folder under ",(0,r.kt)("inlineCode",{parentName:"li"},"/mnt/user/appdata/threetwo")))),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"To get ComicVine to work for metadata scraping and other functions, you ",(0,r.kt)("em",{parentName:"p"},"must")," have a ComicVine API key. You can get one ",(0,r.kt)("a",{parentName:"p",href:"https://comicvine.gamespot.com/api/"},"here"),". Metadata scraping will not work unless you supply an API key.")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("p",{parentName:"li"},"Open an unRAID terminal and create an ",(0,r.kt)("inlineCode",{parentName:"p"},".env")," file:"),(0,r.kt)("ol",{parentName:"li"},(0,r.kt)("li",{parentName:"ol"},"Run this command: ",(0,r.kt)("inlineCode",{parentName:"li"},"nano /boot/config/plugins/compose.manager/projects/ThreeTwo/.env")),(0,r.kt)("li",{parentName:"ol"},"Paste this into the file, replacing anything within ",(0,r.kt)("inlineCode",{parentName:"li"},"<>")," with actual values:")),(0,r.kt)("pre",{parentName:"li"},(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"UNDERLYING_HOSTNAME=<UNRAID_HOSTNAME>\nCOMICS_DIRECTORY=<PATH_TO_COMICS_DIRECTORY>\nUSERDATA_DIRECTORY=/mnt/user/appdata/threetwo/userdata\n\nCOMICVINE_API_KEY=<YOUR_COMICVINE_API_KEY>\n\nLOGGER=true\nLOGLEVEL=info\nSERVICEDIR=dist/services\n\nCHOKIDAR_USEPOLLING=true\n\nUNRAR_BIN_PATH=/usr/bin/unrar\nSEVENZ_BINARY_PATH=/usr/bin/7za\nMONGO_URI=mongodb://db:27017/threetwo\nELASTICSEARCH_URI=http://elasticsearch:9200\nREDIS_URI=redis://redis:6379\nTRANSPORTER=redis://redis:6379\nCACHER=Memory\n")))),(0,r.kt)("h3",{id:"installation"},"Installation"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Install the ",(0,r.kt)("inlineCode",{parentName:"li"},"docker-compose manager")," plugin from the unRAID CA store. After installation, you can find the plugin UI under the ",(0,r.kt)("inlineCode",{parentName:"li"},"Docker")," tab."),(0,r.kt)("li",{parentName:"ol"},"Create a new stack, give it a name."),(0,r.kt)("li",{parentName:"ol"},"Hover over the gear next to it and click on ",(0,r.kt)("inlineCode",{parentName:"li"},"Edit Stack"),"."),(0,r.kt)("li",{parentName:"ol"},"Copy-paste this into the textarea:")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},'version: "3.7"\n\nx-userdata-volume: &userdata-volume\n type: bind\n source: ${USERDATA_DIRECTORY}\n target: /userdata\n\nx-comics-volume: &comics-volume\n type: bind\n source: ${COMICS_DIRECTORY}\n target: /comics\n\nservices:\nthreetwo:\n build:\n context: https://github.com/rishighan/threetwo.git\n dockerfile: Dockerfile\n image: frishi/threetwo\n container_name: threetwo-ui\n env_file: /boot/config/plugins/compose.manager/projects/ThreeTwo/.env\n restart: unless-stopped\n ports:\n - "8050:8050"\n - "3050:3050"\n links:\n - core-services\n depends_on:\n - db\n - elasticsearch\n - redis\n networks:\n - proxy\n\nmetadata-service:\n build:\n context: https://github.com/rishighan/threetwo-metadata-service.git\n image: frishi/threetwo-metadata-service\n container_name: metadata-service\n ports:\n - "3080:3080"\n environment:\n SERVICES: api,comicvine\n env_file: /boot/config/plugins/compose.manager/projects/ThreeTwo/.env\n depends_on:\n - redis\n volumes:\n - *comics-volume\n - *userdata-volume\n networks:\n - proxy\n\ncore-services:\n build:\n context: https://github.com/rishighan/threetwo-core-service.git\n image: frishi/threetwo-core-service\n container_name: core-services\n ports:\n - "3000:3000"\n - "3001:3001"\n depends_on:\n - db\n - redis\n - elasticsearch\n environment:\n name: core-services\n SERVICES: api,library,importqueue,settings,search,socket,imagetransformation,opds\n env_file: /boot/config/plugins/compose.manager/projects/ThreeTwo/.env\n volumes:\n - *comics-volume\n - *userdata-volume\n\n networks:\n - proxy\n\ndb:\n image: "bitnami/mongodb:latest"\n container_name: database\n networks:\n - proxy\n ports:\n - "27017:27017"\n volumes:\n - "mongodb_data:/bitnami/mongodb"\n\nredis:\n image: "bitnami/redis:latest"\n container_name: queue\n environment:\n ALLOW_EMPTY_PASSWORD: "yes"\n networks:\n - proxy\n ports:\n - "6379:6379"\n\nelasticsearch:\n image: docker.elastic.co/elasticsearch/elasticsearch:7.16.2\n container_name: elasticsearch\n environment:\n - "discovery.type=single-node"\n - "ES_JAVA_OPTS=-Xms512m -Xmx512m"\n - "xpack.security.enabled=true"\n - "xpack.security.authc.api_key.enabled=true"\n - "ELASTIC_PASSWORD=password"\n ulimits:\n memlock:\n soft: -1\n hard: -1\n ports:\n - 9200:9200\n networks:\n - proxy\n\nnetworks:\nproxy:\n external: true\n\nvolumes:\nmongodb_data:\n driver: local\nelastic:\n driver: local\n')),(0,r.kt)("ol",{start:5},(0,r.kt)("li",{parentName:"ol"},"Click ",(0,r.kt)("inlineCode",{parentName:"li"},"Save Changes")),(0,r.kt)("li",{parentName:"ol"},"Click ",(0,r.kt)("inlineCode",{parentName:"li"},"Compose Up")," and check for errors."),(0,r.kt)("li",{parentName:"ol"},"If all goes well, you should see the following containers appear as icons without images in the unRAID ",(0,r.kt)("inlineCode",{parentName:"li"},"Docker Containers")," panel:",(0,r.kt)("ol",{parentName:"li"},(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"threetwo-ui")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"core-services")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"metadata-service")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"elasticsearch")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"database")),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"queue")))),(0,r.kt)("li",{parentName:"ol"},"You can look at the logs for these containers by clicking on their icons and then ",(0,r.kt)("inlineCode",{parentName:"li"},"Logs"))),(0,r.kt)("h3",{id:"ports"},"Ports"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"threetwo-ui"),", runs on port 8050"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"threetwo-core-service")," on 3000"),(0,r.kt)("li",{parentName:"ol"},(0,r.kt)("inlineCode",{parentName:"li"},"threetwo-metadata-service")," on 3080")),(0,r.kt)("h3",{id:"getting-updates"},"Getting Updates"),(0,r.kt)("p",null,"Go to the ",(0,r.kt)("inlineCode",{parentName:"p"},"Docker Containers")," tab from the unRAID web UI:"),(0,r.kt)("ol",null,(0,r.kt)("li",{parentName:"ol"},"Click on ",(0,r.kt)("inlineCode",{parentName:"li"},"Compose Down"),", and let the command finish running."),(0,r.kt)("li",{parentName:"ol"},"Click on ",(0,r.kt)("inlineCode",{parentName:"li"},"Compose Pull"),", and let it finish running."),(0,r.kt)("li",{parentName:"ol"},"Click on ",(0,r.kt)("inlineCode",{parentName:"li"},"Compose Up")," to bring up the stack.")))}m.isMDXComponent=!0}}]); |