Closed onedr0p closed 1 year ago
@szabodanika Any update here? This makes microbin impossible to deploy via containers because you need to volume mount the data somewhere.
@szabodanika sorry to keep bothering you but this is a breaking container based deployments of your application.
Hi, I am kind of working on docker aspect these days as part of v2. With the current dockerfile and docker compose, you are able to set a volume or a mapping to any directory on your system. Would this solve your problem? I might be misunderstanding what the issue really is. Regardless, what you're asking is pretty simple to implement, I'll go ahead and do it anyways for v2.
Thanks for getting back to me, that would be excellent if you added that support
Let me know if you're having any trouble with getting the new arg to work the way you want!
Am I reading the changes correctly? Basically I want to set the path to the data to /config inside the container, looking over the changes that doesn't look possible still?
MicroBin does not have a config file other than the environment variables stored in .env. Am I misunderstanding something? Sorry, I am a bit confused now.
What about the database.json or microbin.conf, or where the pastes are stored?
See my issue description.
The database (.json or .sqlite, depending on your setup) and the file attachments will be stored in the directory you set with the new MICROBIN_DATA_DIR argument, and MicroBin will not touch any files outside of this directory.
I suggest also trying the setup script or the Docker compose that I provide, so you don't have to configure everything yourself. Please do let me know if even with the "official" Docker setup you're getting errors. Check here.
Thanks for this, I'll try to get it up and running tomorrow.
Sorry for re-opening this, but it seems to be the best place to put it: this fix did not make it into the v2.0.4 docker image (which still has pasta_data/ hardcoded)
Hi 👋🏼
I am building a rootless Docker container for microbin and there doesn't seem to be a arg to set where the pastes or configuration is stored and appears to just be stored in the same dir as microbin binary.
https://github.com/szabodanika/microbin/blob/f55a5eba96209cf5d6b75dce3dfecd1f1effe3ca/src/main.rs#L66-L72
Logs in the Docker image I am building:
I would be great if you could add a arg called
--config-dir
and--paste-dir
which would point to there the respected pathse.g.
microbin --config-dir /config --paste-dir /data
/config
would contain thedatabase.json
andmicrobin.conf
/data
would contain the pastes