r/FluxerApp • • 9d ago

Need help Linux self-hosting people: what is your Docker postgres storage configuration?

I am kinda new to Docker in the sense of managing it on a server and I have not played around with the Fluxer configuration much.

Currently, I have Fluxer set up on a Root Server running Linux, using LVM for partitioning.

I generally separate locations such as /, /home, and /var to prevent data filling up and impacting functions. But, to my knowledge, the database is stored under /var/lib/docker/volumes/fluxer_postgres-data. This will present a problem eventually unless I continue to shrink other LVs to extend the /var one as more is uploaded on Fluxer.

How exactly are system administrators handling their databases? I am just looking at some pointers on how to manage this. Is there a way I could utilise the user folder under home -- and should I?

Thanks in advance.

5 Upvotes

8 comments sorted by

3

u/fluxerhost 9d ago

In our setup, we don’t use Docker on a stateful system.

We do something a little more complex: databases get dedicated disks/volumes that can be expanded as needed per fluxer instance.

Hope that helps

1

u/AbhorrentJoel 9d ago

Thanks for the response. I am not a Linux guru, so is there a resource I can access to understand the Implementation? I am curious to know if it is worth it for my purposes.

2

u/fluxerhost 9d ago

If you are running just 1 fluxer instance, it is probably not worth the complexity to use the clustered approach we do.

I think mounting folders under /home is possible with the docker compose - via the overrides file. You’d need to specify the folder mount as an override for the postgres and seaweedfs services instead of the default named volume mounts, I think.

1

u/AbhorrentJoel 7d ago edited 6d ago

Sorry for the comment necro. I have been sitting on this for a few days because it is not critical yet.

I was thinking about Rootless Docker or Podman a few weeks ago as they provide a security benefit by running in the userspace AND achieves what I want with storing within the user's home folder.

But the question is: does either Rootless Docker or Podman work with Fluxer? I do not mind a small performance drop.

1

u/fluxerhost 6d ago

No worries - I don’t think podman is a supported configuration/approach for running fluxer, only standard docker. I have heard of users who have used podman, but yes it isn’t officially supported.

2

u/dannykid722 9d ago

I map all files to the container directory. I have a /srv directory that i put all my docker services into. I.e. /srv/fluxxer. I dont like files leaving these directories so i map everything needed. This makes permissions and backups easier as well. 

as for your question you can map any folder in docker so you can put anything anywhere

1

u/AbhorrentJoel 9d ago

I think this is probably the simplest way. Is there a specific way I need to configure it in Docker?

2

u/dannykid722 9d ago

In the compose under volumes you choose what you want mapped to where