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

User persistent docker-compose files #312

Merged
merged 1 commit into from
Feb 26, 2023

Conversation

fsackur
Copy link
Contributor

@fsackur fsackur commented Feb 21, 2023

Relates to #311

I create a docker-compose in the runtipi folder that mounts my /cellar volume:

# runtipi/docker-compose.filebrowser.yml
version: "3.7"
services:
  filebrowser:
    volumes:
      - /cellar:/srv/cellar

Filebrowser gets the volume:

PS ❯ $fb = docker inspect filebrowser | ConvertFrom-Json; $fb.Mounts | ft

Type   Source                                                                                         Destination   Mode   RW Propagation
----   ------                                                                                         -----------   ----   -- -----------
bind   /usr/bin/runtipi/app-data/filebrowser/data/db                                                  /database     rw   True rprivate
bind   /usr/bin/runtipi/app-data                                                                      /srv/app-data rw   True rprivate
bind   /cellar                                                                                        /srv/cellar   rw   True rprivate
bind   /usr/bin/runtipi/media                                                                         /srv/media    rw   True rprivate
volume /var/lib/docker/volumes/455f7ddd0802ea8527b3556a92b7bf8e26ab714eea27f7d9584528a1834d545d/_data /srv          z    True
bind   /usr/bin/runtipi/app-data/filebrowser/data/config                                              /config       rw   True rprivate

The web app shows my volume:
image

Note that my pihole app, whcih does not have a user docker-compose, is unaffected.

@meienberger meienberger changed the base branch from master to develop February 22, 2023 18:05
@meienberger meienberger changed the base branch from develop to master February 22, 2023 18:05
@meienberger
Copy link
Collaborator

This looks very useful thanks for your contribution. Will definitely include this in the next release.
May I ask you to start from the develop branch to avoid conflicts with the next release?

@fsackur
Copy link
Contributor Author

fsackur commented Feb 23, 2023

Will do.

Question: do you think it would it be more user-friendly to have this structure:

runtipi
├───app-data
├───apps
└───user-config
    └───pihole
            app.env
            docker-compose.yml

That way the user can symlink user-config anywhere they like.

I did add the equivalent feature for app.env, I can include it in the PR.

@fsackur fsackur changed the base branch from master to develop February 23, 2023 13:50
@meienberger
Copy link
Collaborator

Will do.

Question: do you think it would it be more user-friendly to have this structure:

runtipi
├───app-data
├───apps
└───user-config
    └───pihole
            app.env
            docker-compose.yml

That way the user can symlink user-config anywhere they like.

I did add the equivalent feature for app.env, I can include it in the PR.

Would make sense yes so we can easily extend it to more override features in the future

@sonarcloud
Copy link

sonarcloud bot commented Feb 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@fsackur
Copy link
Contributor Author

fsackur commented Feb 25, 2023

Done!

Please note I didn't build the app - I just tested the script in my running installation. However, I'm able to configure:

  • pihole address in user-config/pihole/app.env
  • filebrowser mount in user-config/filebrowser/docker-compose.yml
  • jellyfin mount in user-config/jellyfin/docker-compose.yml

@meienberger
Copy link
Collaborator

Tested locally works fine! If you have the time, could you add a section in the wiki explaining how to use this feature?

@meienberger meienberger merged commit ba5d923 into runtipi:develop Feb 26, 2023
@fsackur fsackur deleted the user-compose branch February 26, 2023 18:44
@fsackur fsackur mentioned this pull request Feb 27, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants