Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search results not rendering any results #19

Open
saikarthikp9 opened this issue Sep 30, 2021 · 10 comments
Open

Search results not rendering any results #19

saikarthikp9 opened this issue Sep 30, 2021 · 10 comments

Comments

@saikarthikp9
Copy link

saikarthikp9 commented Sep 30, 2021

I am trying to use the docker-compose file given for VPS, but I am using a local server. See Docker-compose file below.

My modifications:
I have avoided the usage of Caddy as I do not want to use it outside my local network. I believe this is the only use for Caddy here.
I was able to retrieve the Jackett API key and paste it as env var for rapidbay.
I am using a custom docker image for arm using this image as base: hauxir/libtorrent-python3-ubuntu-arm64v8:latest. Docker Build was smooth and successful without any other modifications.

Logs of RapidBay:

* Serving Flask app 'app' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://172.22.0.2:5000/ (Press CTRL+C to quit)

docker-compose:

version: "2"
services:
  nordvpn:
    cap_add:
    - NET_ADMIN
    devices:
      - /dev/net/tun
    environment:
      - USER=email
      - PASS=password
      - COUNTRY="United States"
    image: "azinchen/nordvpn"
    container_name: nordvpn
    restart: unless-stopped

  jackett:
    image: linuxserver/jackett
    volumes:
      - jackett_config:/config
    container_name: jackett
    ports:
      - 9117:9117
    restart: unless-stopped

  rapidbay:
    network_mode: "service:nordvpn"
    image: "dockerrepo/rapidbay-arm-0.0.1:latest"
    environment:
      - PASSWORD=123456
      - JACKETT_HOST=10.0.1.30
      - JACKETT_API_KEY=PLACEHOLDER_CHANGE_THIS_LATER
    container_name: rapidbay
    restart: unless-stopped

volumes: 
  jackett_config:
    driver: local  

What URL should I visit to access rapidbay?
I understand all traffic is going through the nordvpn container (network_mode: "service:nordvpn"). So no ports are exposed for the rapidbay container itself but in Dockerfile I see EXPOSE 5000.

Please advice. I am also trying to understand the networking aspects here. Thanks!
If this is successful, I can create a PR for the arm build as well if you want.

@saikarthikp9
Copy link
Author

Reporting additional tests and results below. Please find docker-compose file below as well.

Tested new VPN image: https://github.com/qdm12/gluetun
Manually tested jackett search from jackett UI and it is showing search results.

Now I am able to access rapidbay! However, when I search, I see 200 response in rapidbay logs but I don't see any search results on rapidbay UI.

Please help.

docker-compose:

version: "2"
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    environment:
      - VPNSP=nordvpn
      - OPENVPN_USER=email
      - OPENVPN_PASSWORD= password
      - REGION=United States
    ports:
      - 5000:5000 #rapidbay
    restart: unless-stopped

  jackett:
    ports:
      - 9117:9117
    image: linuxserver/jackett
    volumes:
      - jackett_config:/config
    container_name: jackett
    restart: unless-stopped

  rapidbay:
    network_mode: "service:gluetun"
    image: "dockerrepo/rapidbay-arm-0.0.1:latest"
    environment:
      - PASSWORD=password
      - JACKETT_HOST=http://10.0.1.30:9117
      - JACKETT_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxx
      - SUBTITLE_LANGUAGES="['en']"
    container_name: rapidbay
    restart: unless-stopped

volumes: 
  jackett_config:
    driver: local    

@saikarthikp9 saikarthikp9 changed the title Unable to access Rapidbay URL locally Search results not rendering any results Sep 30, 2021
@hauxir
Copy link
Owner

hauxir commented Sep 30, 2021

gave you tried curling inside the rapidbay container and calling that jackett endpoint?

@saikarthikp9
Copy link
Author

saikarthikp9 commented Oct 1, 2021

Thank you! That fixed my issue. Need to use the docker network assigned container IP, not host IP (10.0.1.30 as seen above).

This got me wondering if there was a dynamic way to resolve for this IP perhaps using the container name, since docker randomly assign IPs to containers. However, I am unable to even curl using container name expectedly since jackett and rapidbay are not the same docker network. I wonder if there was a way to resolve IP address without hard coding it, which involves running the docker compose stack first then updating stack again with the docker assigned IP like we do with the jackett API key.

In short, was hoping to find a way to do something like: JACKETT_HOST=http://jackett:9117

@hauxir
Copy link
Owner

hauxir commented Oct 1, 2021

that's precisely what linking does
have a look here:
https://github.com/hauxir/rapidbay/blob/master/docker-compose.example.with.jackett.yml#L12

@saikarthikp9
Copy link
Author

Yes, I tried this, but it seems you cannot combine linking with network_mode: "service:gluetun".

@hauxir
Copy link
Owner

hauxir commented Oct 1, 2021

OK try network_mode: "host" on the jackett container, then you should be able to use your local ip address

@jdakillah
Copy link

jdakillah commented Oct 19, 2021

Hi i was struggling myself with getting it up and running. eventually i got it working with this Docker-compose file, you can add VPN if you want it:

PS: Use this command in cmd to find ip adress of jackett container:

docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' jackett

yml file

version: "2"
services:
   jackett:
    image: linuxserver/jackett
    volumes:
      - jackett_config:/config
    container_name: jackett
    ports:
      - 9117:9117
    restart: unless-stopped

   rapidbay:
    image: "hauxir/rapidbay:latest"
    environment:
      - PASSWORD=FILLYOURPASSWORD
      - SUBTITLE_LANGUAGES="['en', 'nl']"
      - JACKETT_HOST=http://JACKETCONTAINERIP:9117
      - JACKETT_API_KEY=FILLYOURAPIKEY
    ports:
      - 5000:5000
    container_name: rapidbay
    links:
      - jackett
    restart: unless-stopped

volumes: 
  jackett_config:
    driver: local  

Hope this helps.

@hauxir
Copy link
Owner

hauxir commented Oct 22, 2021

what was wrong with the example one provided?

version: "3"

services:

  jackett:
    image: linuxserver/jackett
    ports:
      - 9117:9117
    volumes:
      - ./.jackett:/config

  rapidbay:
    image: hauxir/rapidbay:latest
    environment:
      - JACKETT_HOST=http://jackett:9117
      - JACKETT_API_KEY=YOUR_API_KEY
    ports:
      - 5000:5000
    links:
      - jackett

@dillfrescott
Copy link

Having the same exact issue and tried using the ip of the network jackett container too. No luck

@mthanhtran
Copy link

Old topic but if this help someone still looking out.
To solve the issue with gluetun, setup JACKETT_HOST environment with your local host IP + exposed port of Jackett from gluetun, that will work.

eg gluetune compose:
ports:
- 9021:9117 # ? Jackett

rapid compose:

environment:
- JACKETT_HOST=http://host-ip-or-domain:**9021**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants