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

Simplify volume mounts #260

Open
iloveicedgreentea opened this issue Feb 10, 2024 · 8 comments
Open

Simplify volume mounts #260

iloveicedgreentea opened this issue Feb 10, 2024 · 8 comments
Assignees

Comments

@iloveicedgreentea
Copy link

To reduce operational burden and make it simpler to deploy, there should only be one volume needed like /app or something, and the application should then deal with having the right folders in place.

Love the tool thanks for making it

@hargata hargata self-assigned this Feb 18, 2024
@MeurillonGuillaume
Copy link

I've deployed the application using a single volume mounted to the /App path and it seems to work fine for me, but the docker-compose.yml could probably be updated, unless there is a specific reason to have it this way.

@hargata
Copy link
Owner

hargata commented Mar 9, 2024

@MeurillonGuillaume the only thing stopping the app from being able to be fully deployed in a single volume is the data protection keys which has to live in /root/.aspnet/DataProtection-Keys instead of /App but you're right, all the other paths can technically be simplified to just /App and the app will create the folders automatically.

As for the docker compose...yeah, it's pretty outdated and I ought to update it someday, it was created a long time ago, but there are concerns about existing users missing their data if they are updating from multi volume to single volume since their data won't be in there.

I'm still going to leave this ticket open because it's not fully capable of running on a single volume due to the data protection keys volume.

@Judman
Copy link

Judman commented Mar 12, 2024

I've deployed the application using a single volume mounted to the /App path and it seems to work fine for me, but the docker-compose.yml could probably be updated, unless there is a specific reason to have it this way.

Care to share?

@hargata
Copy link
Owner

hargata commented Mar 12, 2024

@Judman this should work.

---
version: "3.4"

services:
  app:
    image: ghcr.io/hargata/lubelogger:latest
    build: .
    restart: unless-stopped
    # volumes used to keep data persistent
    volumes:
      - lubelog:/App/
      - keys:/root/.aspnet/DataProtection-Keys
    # expose port and/or use serving via traefik
    ports:
      - 8080:8080
    env_file:
      - .env

volumes:
  lubelog:
  keys:

@iloveicedgreentea I'm not sure if it's possible to simplify it even further, so I'll be closing this issue since this is about the closest we can get to a single volume.

@hargata hargata closed this as completed Mar 12, 2024
@MeurillonGuillaume
Copy link

@Judman @hargata that is indeed pretty similar to how I have it deployed, works just fine.

@redge76
Copy link
Contributor

redge76 commented Mar 12, 2024

@hargata Have you tried to store /DataProtection-Keys in the lubelog volume and create a link to this directory.
I don't know how the directory is created and initialized but I mean something like this in the Dockerfile:

RUN mkdir /root/.aspnet
RUN ln -s /App/DataProtection-Keys /root/.aspnet/DataProtection-Keys

(with proper creation and initialization of the DataProtection-Keys directory)

Then it would be a true single volume

@redge76
Copy link
Contributor

redge76 commented Mar 16, 2024

As pointed in the #407 issue, this a pretty bad idea to make /app de volume.
I did not realize that /app contained code AND data.

@hargata
Copy link
Owner

hargata commented Mar 16, 2024

@redge76 that makes sense, I'll re-open this ticket, but making this a single volume app is not going to be prioritized anytime soon.

@hargata hargata reopened this Mar 16, 2024
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

No branches or pull requests

5 participants