Make Database Engine Default to /var/lib Directory #61
Labels
No Label
architecture
bug
ci/cd
cleanup
documentation
duplicate
enhancement
good first issue
help wanted
in progress
invalid
new feature
packaging
question
ui
waiting user input
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: platypush/platypush#61
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: julianrichen
This is RFE to make the applications default database location be one of the following or similar:
Context:
I've been using platypush for a few days to test it out since it seems promising, I like your direction for the project and your Medium articles are well written. For reference the below is from testing when I was writing an Ansible role to automatically setup the service so I can redeploy on different machines if something happens.
When installing the daemon I was trying to keep it contained since it's not a system package. I was installing everything
/opt/platypush
where I had:/opt/platypush/venv
was the Python virtual environment/opt/platypush/config
was theconfig.yaml
/opt/platypush/log
were the log files.I then created a system user with no home directory and a shell
/sbin/nologin
as I don't want the daemon user to have any more permissions then it should. You shouldn't be able to login to the user and it doesn't need a home directory as it only really needs to run the dameon. This caused issues because of config module always defaults the engine to~/.local/share/platypush/main.db
. I also noticed the working directory is the same.I know you can override it in the
config.yaml
but as a system user it would be best to not default to a user's home directory for data as it's not guaranteed to exists for system users or system installs. Fromman hier.7
this would probably be best suited for/var/lib/<package>
since it contains state data for packages and subsystems. Other packages store daemon databases here.Currently the default
config.yaml
& log files are in respective system directories,/etc/platypush
&/var/log/platypush
and only the DB isn't. Because of this you'll get errors if you make a non-home system user who doesn't have a home directory and/home/<user>/.local/share/platypush/
doesn't exists.A command line flag should probably also exists for the DB path and logs (which can only be override via
config.yaml
) but I'll submit that as a different ticket.