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

allow user to set docker hostname for pgsql, redis, transmission and jacket #278

Open yodog opened 7 months ago

yodog commented 7 months ago

i've been using the *arr suite for a few years, and only today i found out about bobarr.

i already have transmission, redis and postgres containers running, and i would like to use them instead of running new containers for bobarr.

is there an envionment variable to set the hostnames?

i tried POSTGRES_HOST=bobarr-postgres but the api logs still complain about not finding the postgres hostname.

arr_bobarr-api.1.tcu0ljjl69ct@1037u.local    | 2024-01-13 14:10:40.772 [error] 
TypeOrmModule - Unable to connect to the database. Retrying (5)... - 
{"stack":["Error: getaddrinfo ENOTFOUND postgres\n    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26)"]}

my docker setup:

x-bobarr-env: 
  environment: &bobarrenv
    - PGID=1000
    - PUID=1000
    - TZ=America/Sao_Paulo
    - LIBRARY_MOVIES_FOLDER_NAME=filmes
    - LIBRARY_TV_SHOWS_FOLDER_NAME=series
    - POSTGRES_HOST=bobarr-postgres
    - POSTGRES_DB=bobarr
    - POSTGRES_PASSWORD=bobarr
    - POSTGRES_USER=bobarr
    - REDIS_HOST=bobarr-redis
    - REDIS_PASSWORD=bobarr
    - TRANSMISSION_HOST=transmission

  bobarr-api:
    image: iam4x/bobarr-api:latest
    environment: *bobarrenv
    networks: [ intercontainers ]
    ports: [ 4000:4000 ]
    command: yarn start:prod
    volumes:
      - /data/media:/usr/library

  bobarr-web:
    image: iam4x/bobarr-web:latest
    environment: *bobarrenv
    networks: [ intercontainers ]
    ports: [ 3000:3000 ]
    command: yarn start