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

Postgresql - dependency failed to start #404

Closed
Tataukee opened this issue Sep 10, 2023 · 17 comments
Closed

Postgresql - dependency failed to start #404

Tataukee opened this issue Sep 10, 2023 · 17 comments
Assignees
Labels
question Further information is requested

Comments

@Tataukee
Copy link

Trying to install the app from Portainer following the exact docker compose unfortunately i am not getting thru .
is there any inputs I have to remove / add / correct ?
any help is very appreciative

volumes:
database-data:

services:

midarr:
container_name: midarr
image: ghcr.io/midarrlabs/midarr-server:latest
ports:
- 4000:4000
volumes:
- /volume1/docker/midarr/media:/media
environment:

App config

  - APP_URL=http:my host IP:4000
  - APP_MAILER_FROM=example@email.com
  - SENDGRID_API_KEY=someApiKey

Database config

  - DB_USERNAME=my_user
  - DB_PASSWORD=my_password
  - DB_DATABASE=my_database
  - DB_HOSTNAME=postgresql

Admin account

  - SETUP_ADMIN_EMAIL=my email 
  - SETUP_ADMIN_NAME=my user
  - SETUP_ADMIN_PASSWORD=my password # minimum length 12

Radarr integration

  - RADARR_BASE_URL=my host IP:7878
  - RADARR_API_KEY=API KEY

Sonarr integration

  - SONARR_BASE_URL=my host IP:8989
  - SONARR_API_KEY=API KEY

OIDC / OAuth 2.0 integration

  - OAUTH_CLIENT_ID=someClientId
  - OAUTH_CLIENT_SECRET=someClientSecret
  - OAUTH_ISSUER_URL=http://some-provider.url
  - OAUTH_AUTHORIZE_URL=http://some-provider.url/authorize
  - OAUTH_TOKEN_URL=http://some-provider.url/token
  - OAUTH_REDIRECT_URI=http://some-provider.url/auth/callback
  - OAUTH_USER_URL=http://some-provider.url/user

depends_on:
  postgresql:
    condition: service_healthy

postgresql:
container_name: postgresql
image: postgres
volumes:
- /volume1/docker/midarr/data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=my_user
- POSTGRES_PASSWORD=my_password
- POSTGRES_DB=my_database
healthcheck:
test: "exit 0"

@trueChazza trueChazza self-assigned this Sep 10, 2023
@trueChazza trueChazza added the question Further information is requested label Sep 10, 2023
@trueChazza
Copy link
Member

#403 (comment)

Hi! Sorry you've had some issues. Could you try the linked docker compose and see how you go?

@Tataukee
Copy link
Author

Hello ,
Excellent ! , following the compose you provided it worked like a charm . Thank you so much .
Now, I have two folders ( Movies and Series ) needed to mount .
Here are the two lines I have added to the compose :

midarr:
container_name: midarr
image: ghcr.io/midarrlabs/midarr-server:latest
ports:
- 4000:4000
volumes:
- /volume2/Folder II/Media/Movies:/media
- /volume2/Folder II/Media/TV Shows:/media

environment:
...etc

1- I am not able to see the content of both folders .
2- Do you think I should modify the names of the path to small capital letters ? and also are the spacing a problem causing not mounting properly both paths ?
because my media locations are exactly that path .
Thanks again .

@trueChazza
Copy link
Member

https://github.com/midarrlabs/midarr-server#why-wont-my-media-play

Did you manage to get this working? I would recommend reading through the FAQ.

@Tataukee
Copy link
Author

My media root path is set but i dont see any movies/shows within the interface .. I believe midarr don't see the media somehow ..

@trueChazza
Copy link
Member

Is there media showing in Radarr and Sonarr?

Remember Radarr and Sonarr are responsible for sending your media to Midarr. Your volume mounts are only in Midarr for playback.

@Tataukee
Copy link
Author

Tataukee commented Sep 11, 2023

Yes . I have both Radarr and Sonarr handling my search media and they both are sending requests to SABnzbd I just actually set Midarr to look of the main folder where I have TV Shows and Movies . I dont actually understand how Midarr should pick up the media from Radarr or Sonarr , recognise the files and play them ?

@Tataukee
Copy link
Author

How should midarr integrates with Radarr and Sonarr ?

@trueChazza
Copy link
Member

I dont actually understand how Midarr should pick up the media from Radarr or Sonarr , recognise the files and play them ?

environment:
      - RADARR_BASE_URL=radarr:7878 # required
      - RADARR_API_KEY=someApiKey # required

      - SONARR_BASE_URL=sonarr:8989 # required
      - SONARR_API_KEY=someApiKey # required

Ah no worries, please ensure these environment variables are set. Radarr and Sonarr URLS with their API keys. This allows Midarr to retrieve and show your media library.

You'll find the API keys in Radarr / Sonarr -> Settings -> General

@Tataukee
Copy link
Author

Tataukee commented Sep 11, 2023

Finally Midarr picked up the files I have currently in the both Movies and Series folders .. and they are showing in Midarr interface . However when I try to play a content , i get an internal server error . Any idea ? all files are .mkv by the way . it should not be an issue ..

@trueChazza
Copy link
Member

However when I try to play a content , i get an internal server error . Any idea ?

https://github.com/midarrlabs/midarr-server#why-wont-my-media-play

Yes so this is where your volume mounts must match in Midarr / Radarr / Sonarr

@Tataukee
Copy link
Author

I have included both Movies/Series folders volume path in Midarr's docker compose but still not able to play anything .. what am I doing wrong ?

@Tataukee
Copy link
Author

Tataukee commented Sep 11, 2023

Yes so this is where your volume mounts must match in Midarr / Radarr / Sonarr
Can you provide an example of a volume match between : Midarr / Radarr / Sonarr ?
some kind of an example of a path to media for Midarr / Radarr / sonarr ??
Mine clearly not working ..
Movies and shows are detected from Sonarr and Radarr in Midarr but nothing more

@trueChazza
Copy link
Member

services:

  midarr:
    volumes:
      - "/volume2/Folder II/Media:/media"

  radarr:
    volumes:
      - "/volume2/Folder II/Media:/media"

  sonarr:
    volumes:
      - "/volume2/Folder II/Media:/media"

Based on your comment try mounting your top level "Media" folder in all 3. Then in Radarr and Sonarr setup your "Root Folders" to "Movies" and "TV Shows".

@Tataukee
Copy link
Author

Tataukee commented Sep 12, 2023

The problem with this setup as you mentioned , when I integrate these 3 volumes under services in the docker compose ( regardless the mounting path ), it comes back with an error when i try to update : Failed to deploy a Stack service "sonarr" ; "radarr" has neither an image nor a build context specified : invalid compose project .
Sonarr
Radarr

Here is my current docker compose ( No worries about the sensitive entries they all are fake : API Key's; password ..etc )

Docker Compose

And , here is the docker compose when I integrate Radarr and Sonarr -- not sure if it is the right way-- ( unfortunately with the compose like this and as i said earlier I got a Failure error message : Failed to deploy a Stack service "sonarr" ; "radarr" has neither an image nor a build context specified : invalid compose project .
Hope this can help !

Docker Compose + Radarr and Sonarr

@trueChazza
Copy link
Member

trueChazza commented Sep 12, 2023

Ah I see whats going on, thanks for posting that.

Radarr and Sonarr need more config than just a volume. The example I gave omitted everything except the volumes part - I left this for you to fill in with your own.

I would highly recommend you check out the Docker Compose docs and familiarise yourself with it. It's outside the scope of the project for me to take you through it and explain etc. Plenty of resources out there - as well as just giving it a go.

Take a look through the local dev docker compose too, as it will demonstrate how to set up a stack in Docker.

Good luck!

@trueChazza
Copy link
Member

trueChazza commented Sep 12, 2023

With your Radarr and Sonarr screenshots - I see your root folders are /movies and /tvshows

Are the absolute paths something like - /volume2/Folder II/Media/{movies / tvshows}?

If so try this (just fill in your Radarr and Sonarr URLs and API keys):

version: "3.4"

volumes:
  postgresql-data:

services:

  midarr:
    container_name: midarr
    image: ghcr.io/midarrlabs/midarr-server:latest
    volumes:
      - "/volume2/Folder II/Media/movies:/movies"
      - "/volume2/Folder II/Media/tvshows:/tvshows"
    ports:
      - 4000:4000
    environment:
      - APP_URL=http://midarr:4000

      - DB_USERNAME=my_user
      - DB_PASSWORD=my_password
      - DB_DATABASE=my_database
      - DB_HOSTNAME=postgresql

      - SETUP_ADMIN_EMAIL=admin@email.com
      - SETUP_ADMIN_NAME=admin
      - SETUP_ADMIN_PASSWORD=somepassword

      - RADARR_BASE_URL=radarr:7878 # required
      - RADARR_API_KEY=someApiKey # required

      - SONARR_BASE_URL=sonarr:8989 # required
      - SONARR_API_KEY=someApiKey # required

    depends_on:
      postgresql:
        condition: service_healthy

  postgresql:
    container_name: postgresql
    image: postgres
    volumes:
      - postgresql-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=my_user
      - POSTGRES_PASSWORD=my_password
      - POSTGRES_DB=my_database
    healthcheck:
      test: "exit 0"

@Tataukee
Copy link
Author

This is the absolute path : /volume2/Folder II/Media/{movies / tvshows}
With the setup like this , it didn't work unfortunately .
Thank you so much anyway .
- "/volume2/Folder II/Media/movies:/movies"
- "/volume2/Folder II/Media/tvshows:/tvshows"

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

No branches or pull requests

2 participants