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

Add ability to change the '/data' directory to another one, for example '/config' #21

Closed
sunrize opened this issue Aug 9, 2024 · 1 comment · Fixed by #22
Closed
Labels
enhancement New feature or request

Comments

@sunrize
Copy link

sunrize commented Aug 9, 2024

Is your feature request related to a problem? Please describe.
I had the same problem as in #14 and applied the same solution as in your comment, but it creates "ghost" directories inside appdata on the container host. Furthermore containers from LinuxServer.io and hotio.dev use /config path for application files and I would like to apply the same approach for Trailarr.

Describe the solution you'd like
Create an APP_DATA environment variable to specify the path for the Trailarr files. If it is not specified, then use the default path /data.

Describe alternatives you've considered
When path mapping is implemented, I assume that I will be able to mount the Sonarr and Radarr media folders under /media and redirect their paths there, that is, it will not interfere with /data.

Additional context
Right now my docker-compose.yml looks something like this:

services:
  ...
  sonarr:
    image: lscr.io/linuxserver/sonarr:latest
    container_name: sonarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Australia/Melbourne
    volumes:
      - /docker/appdata/sonarr:/config
      - /mnt/data:/data  # sonarr root folder /data/media/series
    ports:
      - 8989:8989
    restart: unless-stopped
  trailarr:
    image: nandyalu/trailarr:latest
    container_name: trailarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Australia/Melbourne
    ports:
      - 7889:7889
    volumes:
      - /docker/appdata/trailarr:/data
      - /mnt/data/media:/data/media  # this creates 'ghost' subdirectories under /docker/appdata/trailarr on the host
    restart: on-failure
  ...

With APP_DATA environment variable, it will look like this:

services:
  ...
  trailarr:
    image: nandyalu/trailarr:latest
    container_name: trailarr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Australia/Melbourne
      - APP_DATA=/config
    ports:
      - 7889:7889
    volumes:
      - /docker/appdata/trailarr:/config 
      - /mnt/data/media:/data/media
    restart: on-failure
  ...
@sunrize sunrize added the enhancement New feature or request label Aug 9, 2024
@sunrize sunrize changed the title [Request] Add ability to change the '/data' directory to another one, for example '/config' Add ability to change the '/data' directory to another one, for example '/config' Aug 9, 2024
@nandyalu nandyalu added this to the Add ENV variable for /data milestone Aug 9, 2024
@nandyalu
Copy link
Owner

nandyalu commented Aug 9, 2024

This can be added!

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

Successfully merging a pull request may close this issue.

2 participants