microbin icon indicating copy to clipboard operation
microbin copied to clipboard

Add arg and/or environment variable to support changing the config and paste directory

Open onedr0p opened this issue 1 year ago • 0 comments

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:

Couldn't create data directory ./pasta_data/public/: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }

I would be great if you could add a arg called --config-dir and --paste-dir which would point to there the respected paths

e.g.

microbin --config-dir /config --paste-dir /data

  • /config would contain the database.json and microbin.conf
  • /data would contain the pastes

onedr0p avatar Aug 09 '22 13:08 onedr0p