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

How to deploy with a single docker-compose file? #272

Open
injeolmibingsoo opened this issue Apr 1, 2023 · 5 comments
Open

How to deploy with a single docker-compose file? #272

injeolmibingsoo opened this issue Apr 1, 2023 · 5 comments

Comments

@injeolmibingsoo
Copy link

Hello. I love bobarr for being a one-stop-shop for movies/tv shows and have been trying to set it up on my home server for a while now.

What I would like to do, however, is to have all of the configuration in a single docker-compose file, instead of running the prescribed installation and start-up scripts. This allows me to better organize where certain files go where (e.g. config files in my cache drive). In addition, I also wanted to run bobarr with azinchen's nordvpn docker client, which I found to be the easiest way to have services run through my subscription of nordvpn.

I therefore took the provided bobarr/docker-compose.yml and started to add environmental variables from bobarr/.env and azinchen's nordvpn stuff.

Bear in mind that I'm basically a "script kiddie" when it comes to docker. I am okay with making small modifications to example compose files, but don't really understand how it all comes together behind the hood. I hence apologize in advance if I made any gross mistakes in the following compose file.

This is the current version of said compose file, which I am able to deploy. While I did not run into any error during the deployment, the server is not fully functional. I got as far as being able to add movies on the bobarr interface, but couldn't find the downloads starting on transmission.

I'd appreciate any feedback/tips to get this to work. Thanks!

version: "3.6"

volumes:
  web_build:
  api_build:
  api_node_modules:
  web_node_modules:
  db_data:
  redis_data:

networks:
  default:

services:    
  api:
    container_name: bobarr-api
    environment:
      - ENV=production
      - PUID=3001
      - PGID=3001
      - UMASK_SET=0002
      - TZ=US/Eastern        
      - POSTGRES_DB=bobarr
      - POSTGRES_USER=bobarr
      - POSTGRES_PASSWORD=bobarr    
      - REDIS_PASSWORD=bobarr
      - DEBUG_REDIS=false      
      - JACKETT_AUTOMATIC_SEARCH_TIMEOUT=120000
      - JACKETT_MANUAL_SEARCH_TIMEOUT=15000      
      - LIBRARY_MOVIES_FOLDER_NAME=movies
      - LIBRARY_TV_SHOWS_FOLDER_NAME=tvshows
    image: iam4x/bobarr-api:latest
    command: yarn start:prod
    restart: unless-stopped
    volumes:
      - /mnt/ssd1/media/bobarr:/usr/library
    ports:
      - 4000:4000
#     links:
#       - vpn:transmission
#     networks:
#       - default

  web:
    container_name: bobarr-web
#     environment: 
#       - WEB_UI_API_URL=http://yourdomain.com/api
    image: iam4x/bobarr-web:latest
    command: yarn start
    restart: unless-stopped
    ports:
      - 3000:3000
#     links:
#       - vpn:transmission
#     networks:
#       - default      

  postgres:
    container_name: bobarr-postgresql
    image: postgres:12-alpine
    environment:
      - POSTGRES_DB=bobarr
      - POSTGRES_USER=bobarr
      - POSTGRES_PASSWORD=bobarr
    restart: unless-stopped
    volumes:
      - db_data:/var/lib/postgresql/data

  redis:
    container_name: bobarr-redis
    image: bitnami/redis:5.0.6
    environment:
      - REDIS_PASSWORD=bobarr
      - DEBUG_REDIS=false
    restart: unless-stopped
    volumes:
      - redis_data:/bitnami/redis/data

  jackett:
    image: linuxserver/jackett
    container_name: bobarr-jacket
    environment:
      - PUID=3001
      - PGID=3001   
      - UMASK_SET=0002
      - TZ=US/Eastern      
      - JACKETT_AUTOMATIC_SEARCH_TIMEOUT=120000
      - JACKETT_MANUAL_SEARCH_TIMEOUT=15000
    restart: unless-stopped
    volumes:
      - /mnt/ssd0/appdata/jackett/config:/config
      - /mnt/ssd1/media/bobarr/jackett:/downloads
    ports:
      - 9117:9117  
#     network_mode: service:vpn      
#     depends_on:
#       - vpn      

  flaresolverr:
    image: ghcr.io/flaresolverr/flaresolverr:latest
    container_name: bobarr-flaresolverr
    environment:
      - LOG_LEVEL=info
    restart: unless-stopped
    ports:
      - 8191:8191

  transmission:
    image: linuxserver/transmission
    container_name: bobarr-transmission
    environment:
      - PUID=3001
      - PGID=3001
      - UMASK_SET=0002
      - TZ=US/Eastern        
    restart: unless-stopped
    volumes:
      - /mnt/ssd1/media/bobarr/downloads:/downloads
      - /mnt/ssd0/appdata/transmission/config:/config
      - /mnt/ssd0/appdata/transmission/watch:/watch
    network_mode: service:vpn      
    depends_on:
      - vpn      

#   transmission-web:
#     image: dperson/nginx
#     container_name: bobarr-transmission-web
#     depends_on:
#       - transmission
#     environment:
#       - TZ=US/Eastern
#     ports:
#       - "9091:81"
#     command: -w "http://transmission:9091;/"
#     restart: unless-stopped

  vpn:
    image: azinchen/nordvpn:latest
    network_mode: bridge
    container_name: bobarr-nordvpnwireguard
    cap_add:
      - net_admin
    devices:
      - /dev/net/tun
    environment:
      - USER=[nordvpn-user]
      - PASS=[nordvpn-pass]
      - COUNTRY=[nordvpn-country]
      - GROUP=P2P
      - TECHNOLOGY=openvpn_udp
      - RANDOM_TOP=10
      - RECREATE_VPN_CRON=5 */3 * * *
      - NETWORK=192.168.1.0/24
      - OPENVPN_OPTS=--mute-replay-warnings
    ports:
#       - 9117:9117  ## Jackett
      - 9091:9091  ## Transmission
      - 51413:51413  ## Transmission
      - 51413:51413/udp  ## Transmission
@injeolmibingsoo injeolmibingsoo changed the title How to deploy with a single docker-compose file with Nordvpn? How to deploy with a single docker-compose file? Apr 1, 2023
@mune360
Copy link

mune360 commented Apr 5, 2023

Hi !

Here's what I suggest, and it seem to work. However, I'm not using the image: azinchen/nordvpn:latest on my side. I'm using : image: ghcr.io/bubuntux/nordlynx

version: "3.6"

volumes:
  web_build:
  api_build:
  api_node_modules:
  web_node_modules:
  db_data:
  redis_data:

networks:
  default:

services:   

  vpn:
    image: azinchen/nordvpn:latest
    network_mode: bridge
    container_name: bobarr-nordvpnwireguard
    cap_add:
      - net_admin
    devices:
      - /dev/net/tun
    environment:
      - USER=[nordvpn-user]
      - PASS=[nordvpn-pass]
      - COUNTRY=[nordvpn-country]
      - GROUP=P2P
      - TECHNOLOGY=openvpn_udp
      - RANDOM_TOP=10
      - RECREATE_VPN_CRON=5 */3 * * *
      - NETWORK=192.168.1.0/24
      - OPENVPN_OPTS=--mute-replay-warnings
    ports:
      - 9091:9091  ## Transmission
      - 51413:51413  ## Transmission
      - 51413:51413/udp  ## Transmission

  api:
    container_name: bobarr-api
    environment:
      - ENV=production
      - PUID=3001
      - PGID=3001
      - UMASK_SET=0002
      - TZ=US/Eastern        
      - POSTGRES_DB=bobarr
      - POSTGRES_USER=bobarr
      - POSTGRES_PASSWORD=bobarr    
      - REDIS_PASSWORD=bobarr
      - DEBUG_REDIS=false      
      - JACKETT_AUTOMATIC_SEARCH_TIMEOUT=120000
      - JACKETT_MANUAL_SEARCH_TIMEOUT=15000      
      - LIBRARY_MOVIES_FOLDER_NAME=movies
      - LIBRARY_TV_SHOWS_FOLDER_NAME=tvshows
    image: iam4x/bobarr-api:latest
    command: yarn start:prod
    restart: unless-stopped
    volumes:
      - /mnt/ssd1/media/bobarr:/usr/library
    ports:
      - 4000:4000
    links:
      - vpn:transmission
    networks:
      - default
    depends_on:
      - vpn


  web:
    container_name: bobarr-web
#     environment: 
#       - WEB_UI_API_URL=http://yourdomain.com/api
    image: iam4x/bobarr-web:latest
    command: yarn start
    restart: unless-stopped
    ports:
      - 3000:3000


  postgres:
    container_name: bobarr-postgresql
    image: postgres:12-alpine
    environment:
      - POSTGRES_DB=bobarr
      - POSTGRES_USER=bobarr
      - POSTGRES_PASSWORD=bobarr
    restart: unless-stopped
    volumes:
      - db_data:/var/lib/postgresql/data

  redis:
    container_name: bobarr-redis
    image: bitnami/redis:5.0.6
    environment:
      - REDIS_PASSWORD=bobarr
      - DEBUG_REDIS=false
    restart: unless-stopped
    volumes:
      - redis_data:/bitnami/redis/data

  jackett:
    image: linuxserver/jackett
    container_name: bobarr-jacket
    environment:
      - PUID=3001
      - PGID=3001   
      - UMASK_SET=0002
      - TZ=US/Eastern      
      - JACKETT_AUTOMATIC_SEARCH_TIMEOUT=120000
      - JACKETT_MANUAL_SEARCH_TIMEOUT=15000
    restart: unless-stopped
    volumes:
      - /mnt/ssd0/appdata/jackett/config:/config
      - /mnt/ssd1/media/bobarr/jackett:/downloads
    ports:
      - 9117:9117  
 

  flaresolverr:
    image: ghcr.io/flaresolverr/flaresolverr:latest
    container_name: bobarr-flaresolverr
    environment:
      - LOG_LEVEL=info
    restart: unless-stopped
    ports:
      - 8191:8191
    depends_on:
      - vpn

  transmission:
    image: linuxserver/transmission
    container_name: bobarr-transmission
    environment:
      - PUID=3001
      - PGID=3001
      - UMASK_SET=0002
      - TZ=US/Eastern        
    restart: unless-stopped
    volumes:
      - /mnt/ssd1/media/bobarr/downloads:/downloads
      - /mnt/ssd0/appdata/transmission/config:/config
      - /mnt/ssd0/appdata/transmission/watch:/watch  
    network_mode: service:vpn      
    depends_on:
      - vpn      

  transmission-web:
    image: dperson/nginx
    container_name: bobarr-transmission-web
    depends_on:
      - transmission
    environment:
      - TZ=America/Toronto
    ports:
      - "9091:80"
      - "4443:443"
    command: -w "http://transmission:9091;/"
    restart: unless-stopped
    depends_on:
      - vpn    
    links:
      - vpn:transmission
    networks:
      - default

@injeolmibingsoo
Copy link
Author

injeolmibingsoo commented Apr 9, 2023

Hi @mune360! Thank you so much for looking into this!

I've managed to adapt my config to yours. I believe we're close! I think I'm still having trouble accessing transmission from behind the vpn through the reverse proxy. That part of my config is the same as yours, I believe.

version: "3.6"

volumes:
  web_build:
  api_build:
  api_node_modules:
  web_node_modules:
  db_data:
  redis_data:

networks:
  default:

services:    

  vpn:
    image: azinchen/nordvpn:latest
    network_mode: bridge
    container_name: bobarr-nordvpnwireguard
    cap_add:
      - net_admin
    devices:
      - /dev/net/tun
    environment:
      - USER=[nordvpn_user]
      - PASS=[nordvpn_pass]
      - COUNTRY=[nordvpn_country]
      - GROUP=P2P
      - TECHNOLOGY=openvpn_udp
      - RANDOM_TOP=10
      - RECREATE_VPN_CRON=5 */3 * * *
      - NETWORK=192.168.1.0/24
      - OPENVPN_OPTS=--mute-replay-warnings
    ports:
      - 8081:80

  api:
    container_name: bobarr-api
    environment:
      - ENV=production
      - PUID=3001
      - PGID=3001
      - UMASK_SET=0002
      - TZ=US/Eastern        
      - POSTGRES_DB=bobarr
      - POSTGRES_USER=bobarr
      - POSTGRES_PASSWORD=bobarr    
      - REDIS_PASSWORD=bobarr
      - DEBUG_REDIS=false      
      - JACKETT_AUTOMATIC_SEARCH_TIMEOUT=120000
      - JACKETT_MANUAL_SEARCH_TIMEOUT=15000      
      - LIBRARY_MOVIES_FOLDER_NAME=movies
      - LIBRARY_TV_SHOWS_FOLDER_NAME=tvshows
    image: iam4x/bobarr-api:latest
    command: yarn start:prod
    restart: unless-stopped
    volumes:
      - /mnt/ssd1/media/bobarr:/usr/library
    ports:
      - 4000:4000
    links:
      - vpn:transmission
    networks:
      - default
    depends_on:
      - vpn

  web:
    container_name: bobarr-web
#     environment: 
#       - WEB_UI_API_URL=http://yourdomain.com/api
    image: iam4x/bobarr-web:latest
    command: yarn start
    restart: unless-stopped
    ports:
      - 3000:3000
#     links:
#       - vpn:transmission
#     networks:
#       - default      

  postgres:
    container_name: bobarr-postgresql
    image: postgres:12-alpine
    environment:
      - POSTGRES_DB=bobarr
      - POSTGRES_USER=bobarr
      - POSTGRES_PASSWORD=bobarr
    restart: unless-stopped
    volumes:
      - db_data:/var/lib/postgresql/data

  redis:
    container_name: bobarr-redis
    image: bitnami/redis:5.0.6
    environment:
      - REDIS_PASSWORD=bobarr
      - DEBUG_REDIS=false
    restart: unless-stopped
    volumes:
      - redis_data:/bitnami/redis/data

  jackett:
    image: linuxserver/jackett
    container_name: bobarr-jacket
    environment:
      - PUID=3001
      - PGID=3001   
      - UMASK_SET=0002
      - TZ=US/Eastern      
      - JACKETT_AUTOMATIC_SEARCH_TIMEOUT=120000
      - JACKETT_MANUAL_SEARCH_TIMEOUT=15000
    restart: unless-stopped
    volumes:
      - /mnt/ssd0/appdata/jackett/config:/config
      - /mnt/ssd1/media/bobarr/jackett:/downloads
    ports:
      - 9117:9117  
#     network_mode: service:vpn      
#     depends_on:
#       - vpn      

  flaresolverr:
    image: ghcr.io/flaresolverr/flaresolverr:latest
    container_name: bobarr-flaresolverr
    environment:
      - LOG_LEVEL=info
    restart: unless-stopped
    ports:
      - 8191:8191
    depends_on:
      - vpn

  transmission:
    image: linuxserver/transmission
    container_name: bobarr-transmission
    environment:
      - PUID=3001
      - PGID=3001
      - UMASK_SET=0002
      - TZ=US/Eastern        
    restart: unless-stopped
    volumes:
      - /mnt/ssd1/media/bobarr/downloads:/downloads
      - /mnt/ssd0/appdata/transmission/config:/config
      - /mnt/ssd0/appdata/transmission/watch:/watch
    network_mode: service:vpn      
    depends_on:
      - vpn      

  transmission-web:
    image: dperson/nginx
    container_name: bobarr-transmission-web
    depends_on:
      - transmission
      - vpn
    environment:
      - TZ=US/Eastern
    ports:
      - 9091:80
      - 4443:443
    command: -w "http://transmission:9091;/"
    restart: unless-stopped
    links:
      - vpn:transmission
    networks:
      - default

Taking a look at the bobarr-transmission-web > Logs, this is what I see.

2023/04/09 01:35:46 [emerg] 7#7: host not found in upstream "transmission" in /etc/nginx/conf.d/default.conf:43
nginx: [emerg] host not found in upstream "transmission" in /etc/nginx/conf.d/default.conf:43

@injeolmibingsoo
Copy link
Author

injeolmibingsoo commented Sep 16, 2023

Hi. I made some progress on this. I am now able to access transmission through my VPN but am running into other problems. Adding a movie doesn't seem to do anything. When I try to add a torrent file manually by clicking on the movie card and then through Replace > select own .torrent, this is what I see:

image

In addition to the above, I am of course skeptical that other parts of bobarr is fully functional, so any help to fully set this up is much appreciated. If @mune360 (thanks for the help so far) and @iam4x (thanks for creating this app) could look into this, I'd be very thankful.

I know have two docker compose files -- one for bobarr and another one just for the VPN. I do everything on Portainer, and first deploy vpn.yml before deploying bobarr.yml.

bobarr.yml

version: "3.6"

volumes:
  web_build:
  api_build:
  api_node_modules:
  web_node_modules:
  db_data:
  redis_data:

networks:
  default:

services:    

  api:
    container_name: bobarr-api
    environment:
      - ENV=production
      - PUID=3000
      - PGID=3000
      - UMASK_SET=0002
      - TZ=US/Eastern        
      - POSTGRES_DB=bobarr
      - POSTGRES_USER=bobarr
      - POSTGRES_PASSWORD=bobarr    
      - REDIS_PASSWORD=bobarr
      - DEBUG_REDIS=false      
      - JACKETT_AUTOMATIC_SEARCH_TIMEOUT=120000
      - JACKETT_MANUAL_SEARCH_TIMEOUT=15000      
      - LIBRARY_MOVIES_FOLDER_NAME=movies
      - LIBRARY_TV_SHOWS_FOLDER_NAME=tvshows
    image: iam4x/bobarr-api:latest
    command: yarn start:prod
    restart: unless-stopped
    volumes:
      - /mnt/ssd1/media/bobarr:/usr/library
    ports:
      - 4000:4000
    external_links:
      - vpn:transmission      
    networks:
      - default

  web:
    container_name: bobarr-web
#     environment: 
#       - WEB_UI_API_URL=http://yourdomain.com/api
    image: iam4x/bobarr-web:latest
    command: yarn start
    restart: unless-stopped
    ports:
      - 3000:3000  

  postgres:
    container_name: bobarr-postgresql
    image: postgres:12-alpine
    environment:
      - POSTGRES_DB=bobarr
      - POSTGRES_USER=bobarr
      - POSTGRES_PASSWORD=bobarr
    restart: unless-stopped
    volumes:
      - db_data:/var/lib/postgresql/data

  redis:
    container_name: bobarr-redis
    image: bitnami/redis:5.0.6
    environment:
      - REDIS_PASSWORD=bobarr
      - DEBUG_REDIS=false
    restart: unless-stopped
    volumes:
      - redis_data:/bitnami/redis/data

  jackett:
    image: linuxserver/jackett
    container_name: bobarr-jacket
    environment:
      - PUID=3000
      - PGID=3000
      - UMASK_SET=0002
      - TZ=US/Eastern      
      - JACKETT_AUTOMATIC_SEARCH_TIMEOUT=120000
      - JACKETT_MANUAL_SEARCH_TIMEOUT=15000
    restart: unless-stopped
    volumes:
      - /mnt/ssd0/appdata/jackett/config:/config
      - /mnt/ssd1/media/bobarr/jackett:/downloads
    ports:
      - 9117:9117     

  flaresolverr:
    image: ghcr.io/flaresolverr/flaresolverr:latest
    container_name: bobarr-flaresolverr
    environment:
      - LOG_LEVEL=info
    restart: unless-stopped
    ports:
      - 8191:8191

  transmission:
    image: linuxserver/transmission
    container_name: bobarr-transmission
    environment:
      - PUID=3000
      - PGID=3000
      - UMASK_SET=0002
      - TZ=US/Eastern        
    restart: unless-stopped
    volumes:
      - /mnt/ssd1/media/bobarr/downloads:/downloads
      - /mnt/ssd0/appdata/transmission/config:/config
      - /mnt/ssd0/appdata/transmission/watch:/watch
    network_mode: container:nordvpnwireguard

vpn.yml

version: "3.5"
services:
  vpn:
    image: azinchen/nordvpn:latest
    network_mode: bridge
    container_name: bobarr-nordvpnwireguard
    cap_add:
      - net_admin
    devices:
      - /dev/net/tun
    environment:
      - USER=[nordvpn_user]
      - PASS=[nordvpn_pass]
      - COUNTRY=[nordvpn_country]
      - GROUP=P2P
      - TECHNOLOGY=openvpn_udp
      - RANDOM_TOP=10
      - RECREATE_VPN_CRON=5 */3 * * *
      - NETWORK=192.168.1.0/24
      - OPENVPN_OPTS=--mute-replay-warnings
    ports:
      - 9091:9091  ## bobarr-transmission      
      - 51413:51413  ## transmission
      - 51413:51413/udp  ## transmission

@Kmfernan5
Copy link

solution?

@injeolmibingsoo
Copy link
Author

Unfortunately, I didn't arrive at one and moved onto the standard arr stack instead.

Still interested in deploying this if someone can make it work!

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

3 participants