iam4x / bobarr

🍿 The all-in-one alternative for Sonarr, Radarr, Jackett... with a VPN and running in docker
MIT License
1.5k stars 85 forks source link

HowTo: Reverse Proxy with Caddy #238

Open Saboti opened 2 years ago

Saboti commented 2 years ago

Hi everybody,

just a quick guide to get bobarr running via reverse Proxy.

  1. Setup 2 domains bobarr.xyz.com | bobarrapi.xyz.com
  2. git clone https://github.com/iam4x/bobarr.git
  3. cd bobarr
  4. nano packages/web/utils/api-url.ts
  5. change the line export const apiURL = process.env.WEB_UI_API_URL || 'http://${host}:4000'; to export const apiURL = 'https://bobarrapi.xyz.com'; (PLease use ` instead of ' for the URL)
  6. docker-compose build web
  7. cd to some other place e.g. /opt and run the setup script for bobarr curl -o- https://raw.githubusercontent.com/iam4x/bobarr/master/scripts/install.sh | bash
  8. Stop bobar ./bobarr.sh stop
  9. include Caddy-Docker-Proxy in the docker-compose.yml for api and web https://github.com/lucaslorentz/caddy-docker-proxy
  10. example for api:
    networks:
      - default
      - caddy
    labels:
      caddy: https://bobarrapi.xyz.com
      caddy.reverse_proxy: "{{upstreams 4000}}"
  11. Add the networks: part to all other Container.
  12. ./bobarr.sh start
  13. Now everything should work.
iam4x commented 2 years ago

Hey, thank you are you willing to make a PR to enable it by default? Or maybe add it on the README.

Cheers,