1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
"use strict";(self.webpackChunkthreetwo_docs=self.webpackChunkthreetwo_docs||[]).push([[813],{5001:function(e,n,t){t.r(n),t.d(n,{frontMatter:function(){return s},contentTitle:function(){return l},metadata:function(){return p},toc:function(){return c},default:function(){return d}});var o=t(7462),a=t(3366),i=(t(7294),t(3905)),r=["components"],s={sidebar_position:2,id:"unRAID_dockercompose",title:"Install ThreeTwo! on unRAID with the docker-compose plugin"},l=void 0,p={unversionedId:"unRAID_dockercompose",id:"unRAID_dockercompose",isDocsHomePage:!1,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",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"}},c=[{value:"Notes",id:"notes",children:[]},{value:"Pre-requisites",id:"pre-requisites",children:[]},{value:"Installation",id:"installation",children:[]},{value:"Ports",id:"ports",children:[]},{value:"Getting Updates",id:"getting-updates",children:[]}],m={toc:c};function d(e){var n=e.components,t=(0,a.Z)(e,r);return(0,i.kt)("wrapper",(0,o.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h3",{id:"notes"},"Notes"),(0,i.kt)("p",null,"This guide goes over ThreeTwo! installation on unRAID using the ",(0,i.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,i.kt)("p",null,"With the help of this plugin, you are able to pull the entire ThreeTwo! ",(0,i.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,i.kt)("p",null,"That said, the plugin is still in beta, so you may experience strange behavior. "),(0,i.kt)("h3",{id:"pre-requisites"},"Pre-requisites"),(0,i.kt)("p",null,"First things first, let's go over what the pre-requisites are:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"The ",(0,i.kt)("inlineCode",{parentName:"p"},"docker-compose")," configuration for ThreeTwo! now resides in its own repo here: ",(0,i.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,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"A working ",(0,i.kt)("inlineCode",{parentName:"p"},"AirDC++")," install is necessary for ",(0,i.kt)("inlineCode",{parentName:"p"},"DC++")," searching/downloading to work. You can install it through the unRAID via the CA store or via a ",(0,i.kt)("a",{parentName:"p",href:"https://airdcpp.net/download#linux-nas-docker-other"},"docker"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"comics")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"userdata")," folders."),(0,i.kt)("ol",{parentName:"li"},(0,i.kt)("li",{parentName:"ol"},"The ",(0,i.kt)("inlineCode",{parentName:"li"},"comics")," folder ",(0,i.kt)("em",{parentName:"li"},"must")," be the folder ",(0,i.kt)("inlineCode",{parentName:"li"},"AirDC++")," downloads comics to."),(0,i.kt)("li",{parentName:"ol"},"Create the ",(0,i.kt)("inlineCode",{parentName:"li"},"userdata")," folder under ",(0,i.kt)("inlineCode",{parentName:"li"},"/mnt/user/appdata/threetwo")))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"To get ComicVine to work for metadata scraping and other functions, you ",(0,i.kt)("em",{parentName:"p"},"must")," have a ComicVine API key. You can get one ",(0,i.kt)("a",{parentName:"p",href:"https://comicvine.gamespot.com/api/"},"here"),". Metadata scraping will not work unless you supply an API key.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Open an unRAID terminal and create an ",(0,i.kt)("inlineCode",{parentName:"p"},".env")," file:"),(0,i.kt)("ol",{parentName:"li"},(0,i.kt)("li",{parentName:"ol"},"Run this command: ",(0,i.kt)("inlineCode",{parentName:"li"},"nano /boot/config/plugins/compose.manager/projects/ThreeTwo/.env")),(0,i.kt)("li",{parentName:"ol"},"Paste this into the file, replacing anything within ",(0,i.kt)("inlineCode",{parentName:"li"},"<>")," with actual values:")),(0,i.kt)("pre",{parentName:"li"},(0,i.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,i.kt)("h3",{id:"installation"},"Installation"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Install the ",(0,i.kt)("inlineCode",{parentName:"p"},"docker-compose manager")," plugin from the unRAID CA store. After installation, you can find the plugin UI under the ",(0,i.kt)("inlineCode",{parentName:"p"},"Docker")," tab.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Create a new stack, give it a name.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Hover over the gear next to it and click on ",(0,i.kt)("inlineCode",{parentName:"p"},"Edit Stack"),".")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Copy-paste this into the textarea:"),(0,i.kt)("pre",{parentName:"li"},(0,i.kt)("code",{parentName:"pre",className:"language-yaml"},'version: "3.7"\n\nx-userdata-volume:\n&userdata-volume\ntype: bind\nsource: ${USERDATA_DIRECTORY}\ntarget: /userdata\n\nx-comics-volume:\n&comics-volume\ntype: bind\nsource: ${COMICS_DIRECTORY}\ntarget: /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\nelasticsearch:\n driver: local\n'))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Click ",(0,i.kt)("inlineCode",{parentName:"p"},"Save Changes"))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"Click ",(0,i.kt)("inlineCode",{parentName:"p"},"Compose Up")," and check for errors.")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"If all goes well, you should see the following containers appear as icons without images in the unRAID ",(0,i.kt)("inlineCode",{parentName:"p"},"Docker Containers")," panel:"),(0,i.kt)("ol",{parentName:"li"},(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"threetwo-ui")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"core-services")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"metadata-service")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"elasticsearch")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"database")),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"queue")))),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("p",{parentName:"li"},"You can look at the logs for these containers by clicking on their icons and then ",(0,i.kt)("inlineCode",{parentName:"p"},"Logs")))),(0,i.kt)("h3",{id:"ports"},"Ports"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"threetwo-ui"),", runs on port 8050"),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"threetwo-core-service")," on 3000"),(0,i.kt)("li",{parentName:"ol"},(0,i.kt)("inlineCode",{parentName:"li"},"threetwo-metadata-service")," on 3080")),(0,i.kt)("h3",{id:"getting-updates"},"Getting Updates"),(0,i.kt)("p",null,"Go to the ",(0,i.kt)("inlineCode",{parentName:"p"},"Docker Containers")," tab from the unRAID web UI:"),(0,i.kt)("ol",null,(0,i.kt)("li",{parentName:"ol"},"Click on ",(0,i.kt)("inlineCode",{parentName:"li"},"Compose Down"),", and let the command finish running."),(0,i.kt)("li",{parentName:"ol"},"Click on ",(0,i.kt)("inlineCode",{parentName:"li"},"Compose Pull"),", and let it finish running."),(0,i.kt)("li",{parentName:"ol"},"Click on ",(0,i.kt)("inlineCode",{parentName:"li"},"Compose Up")," to bring up the stack.")))}d.isMDXComponent=!0}}]); |