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

Configure filesystem paths from the command line #24

Closed
wants to merge 1 commit into from

Conversation

hawkw
Copy link

@hawkw hawkw commented Feb 8, 2024

Currently, all paths used by the server are hard-coded to paths in the directory where the server source code is located. On Unix systems, it's preferable to store state, configuration, and log files in different directories. Therefore, this commit adds the following new command-line arguments to configure these paths:

  • --state-dir: configures the directory where the database and uploaded image files are stored.
  • --config-path: configures the path to the config file.
  • --log-path: configures the path to the directory where log files will be written.
  • --lock-path: configures the path to the directory where the server will store its PID lock file.

If these command-line arguments are not provided, the server behaves identically to the way it does today.

Fixes #20

Currently, all paths used by the server are hard-coded to paths in the
directory where the server source code is located. On Unix systems, it's
preferable to store state, configuration, and log files in different
directories. Therefore, this commit adds the following new command-line
arguments to configure these paths:

- `--state-dir`: configures the directory where the database and
  uploaded image files are stored.
- `--config-path`: configures the path to the config file.
- `--log-path`: configures the path to the directory where log files
  will be written.
- `--lock-path`: configures the path to the directory where the server
  will store its PID lock file.

If these command-line arguments are not provided, the server behaves
identically to the way it does today.
hawkw added a commit to hawkw/vu-server-flake that referenced this pull request Feb 13, 2024
looks like SasaKaranovic/VU-Server#24 is probably not going to happen,
so let's just switch back to upstream and symlink the files we need into
the runtime dir. I don't like this, but it's fine...
@SasaKaranovic
Copy link
Owner

This PR should be addressed by the #29

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

Successfully merging this pull request may close these issues.

Allow overriding config file, database, and other paths from the command line
2 participants