2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-11-10 06:25:00 +00:00

Update readme

This commit is contained in:
Aode (lion) 2022-04-03 13:31:52 -05:00
parent 82b7caf60e
commit d16fa711b8

189
README.md
View file

@ -9,149 +9,116 @@ _a simple image hosting service_
## Usage ## Usage
### Running ### Running
``` ```
pict-rs pict-rs 0.4.0-alpha.1
asonix <asonix@asonix.dog>
A simple image hosting service
USAGE: USAGE:
pict-rs [OPTIONS] <SUBCOMMAND> pict-rs [OPTIONS] <SUBCOMMAND>
OPTIONS: OPTIONS:
-a, --addr <ADDR>
The address and port the server binds to.
--api-key <API_KEY>
An optional string to be checked on requests to privileged endpoints
-c, --config-file <CONFIG_FILE> -c, --config-file <CONFIG_FILE>
Path to the pict-rs configuration file Path to the pict-rs configuration file
--console-address <CONSOLE_ADDRESS>
Address and port to expose tokio-console metrics
--console-buffer-capacity <CONSOLE_BUFFER_CAPACITY> --console-buffer-capacity <CONSOLE_BUFFER_CAPACITY>
Specify the number of events the console subscriber is allowed to buffer Capacity of the console-subscriber Event Buffer
-f, --filters <FILTERS>
An optional list of filters to permit, supports 'identity', 'thumbnail', 'resize',
'crop', and 'blur'
--filesystem-storage-path <FILESYSTEM_STORAGE_PATH>
Path in which pict-rs will create it's 'files' directory
-h, --help -h, --help
Print help information Print help information
-i, --image-format <IMAGE_FORMAT> --log-format <LOG_FORMAT>
An optional image format to convert all uploaded files into, supports 'jpg', 'png', and Format of logs printed to stdout
'webp'
-m, --max-file-size <MAX_FILE_SIZE> --log-targets <LOG_TARGETS>
Specify the maximum allowed uploaded file size (in Megabytes) Log levels to print to stdout, respects RUST_LOG formatting
--max-image-area <MAX_IMAGE_AREA> --old-db-path <OLD_DB_PATH>
Specify the maximum area in pixels allowed in an image Path to the old pict-rs sled database
--max-image-height <MAX_IMAGE_HEIGHT> --opentelemetry-service-name <OPENTELEMETRY_SERVICE_NAME>
Specify the maximum width in pixels allowed on an image Service Name to use for OpenTelemetry
--max-image-width <MAX_IMAGE_WIDTH> --opentelemetry-targets <OPENTELEMETRY_TARGETS>
Specify the maximum width in pixels allowed on an image Log levels to use for OpenTelemetry, respects RUST_LOG formatting
-o, --opentelemetry-url <OPENTELEMETRY_URL> --opentelemetry-url <OPENTELEMETRY_URL>
Enable OpenTelemetry Tracing exports to the given OpenTelemetry collector URL to send OpenTelemetry metrics
--object-store-access-key <OBJECT_STORE_ACCESS_KEY> --save-to <SAVE_TO>
File to save the current configuration for reproducible runs
-V, --version
--object-store-bucket-name <OBJECT_STORE_BUCKET_NAME> Print version information
Name of the bucket in which pict-rs will store images
--object-store-region <OBJECT_STORE_REGION>
Region in which the bucket exists, can be an http endpoint
--object-store-secret-key <OBJECT_STORE_SECRET_KEY>
--object-store-security-token <OBJECT_STORE_SECURITY_TOKEN>
--object-store-session-token <OBJECT_STORE_SESSION_TOKEN>
-p, --path <PATH>
The path to the data directory, e.g. data/
-R, --repo <REPO>
Set the database implementation. Available options are 'sled'. Default is 'sled'
-s, --skip-validate-imports
Whether to skip validating images uploaded via the internal import API
-S, --store <STORE>
Set the image store. Available options are 'object-storage' or 'filesystem'. Default is
'filesystem'
--sled-cache-capacity <SLED_CACHE_CAPACITY>
The number of bytes sled is allowed to use for it's in-memory cache
--sled-path <SLED_PATH>
Path in which pict-rs will create it's 'repo' directory
SUBCOMMANDS: SUBCOMMANDS:
dump filesystem Migrate from the provided filesystem storage
help Print this message or the help of the given subcommand(s) help Print this message or the help of the given subcommand(s)
migrate-repo object-storage Migrate from the provided object storage
migrate-store run Runs the pict-rs web server
run
```
```
pict-rs-dump
USAGE:
pict-rs dump <PATH>
ARGS:
<PATH>
OPTIONS:
-h, --help Print help information
```
```
pict-rs-migrate-repo
USAGE:
pict-rs migrate-repo <TO>
ARGS:
<TO>
OPTIONS:
-h, --help Print help information
```
```
pict-rs-migrate-store
USAGE:
pict-rs migrate-store <TO>
ARGS:
<TO>
OPTIONS:
-h, --help Print help information
``` ```
``` ```
pict-rs-run pict-rs-run
Runs the pict-rs web server
USAGE: USAGE:
pict-rs run pict-rs run [OPTIONS] [SUBCOMMAND]
OPTIONS: OPTIONS:
-h, --help Print help information -a, --address <ADDRESS>
The address and port to bind the pict-rs web server
--api-key <API_KEY>
The API KEY required to access restricted routes
-h, --help
Print help information
--media-enable-silent-video <MEDIA_ENABLE_SILENT_VIDEO>
Whether to enable GIF and silent MP4 uploads. Full videos are unsupported
--media-filters <MEDIA_FILTERS>
Which media filters should be enabled on the `process` endpoint
--media-format <MEDIA_FORMAT>
Enforce uploaded media is transcoded to the provided format
--media-max-area <MEDIA_MAX_AREA>
The maximum area, in pixels, for uploaded media
--media-max-file-size <MEDIA_MAX_FILE_SIZE>
The maximum size, in megabytes, for uploaded media
--media-max-height <MEDIA_MAX_HEIGHT>
The maximum height, in pixels, for uploaded media
--media-max-width <MEDIA_MAX_WIDTH>
The maximum width, in pixels, for uploaded media
--media-skip-validate-imports <MEDIA_SKIP_VALIDATE_IMPORTS>
Whether to validate media on the "import" endpoint
--worker-id <WORKER_ID>
SUBCOMMANDS:
filesystem Run pict-rs with filesystem storage
help Print this message or the help of the given subcommand(s)
object-storage Run pict-rs with object storage
``` ```
See [`pict-rs.toml`](https://git.asonix.dog/asonix/pict-rs/src/branch/main/pict-rs.toml) and Try running `help` commands for more runtime configuration options
[`migrate.toml`](https://git.asonix.dog/asonix/pict-rs/src/branch/main/migrate.toml) for more ```
$ pict-rs run filesystem -h
$ pict-rs run object-storage -h
$ pict-rs run filesystem sled -h
$ pict-rs run object-storage sled -h
```
See [`pict-rs.toml`](https://git.asonix.dog/asonix/pict-rs/src/branch/main/pict-rs.toml) for more
configuration configuration
#### Example: #### Example: