mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 19:31:35 +00:00
Remove redundant default info, update readme help, add 'check' helper
This commit is contained in:
parent
83ebf4d872
commit
cc37f0dd8a
5 changed files with 19 additions and 11 deletions
17
README.md
17
README.md
|
@ -4,7 +4,7 @@ _a simple image hosting service_
|
||||||
## Usage
|
## Usage
|
||||||
### Running
|
### Running
|
||||||
```
|
```
|
||||||
pict-rs 0.1.4
|
pict-rs 0.2.0-alpha.2
|
||||||
|
|
||||||
USAGE:
|
USAGE:
|
||||||
pict-rs [FLAGS] [OPTIONS] --path <path>
|
pict-rs [FLAGS] [OPTIONS] --path <path>
|
||||||
|
@ -15,10 +15,10 @@ FLAGS:
|
||||||
-V, --version Prints version information
|
-V, --version Prints version information
|
||||||
|
|
||||||
OPTIONS:
|
OPTIONS:
|
||||||
-a, --addr <addr> The address and port the server binds to. Default: 0.0.0.0:8080 [env:
|
-a, --addr <addr> The address and port the server binds to. [env: PICTRS_ADDR=] [default:
|
||||||
PICTRS_ADDR=] [default: 0.0.0.0:8080]
|
0.0.0.0:8080]
|
||||||
-f, --format <format> An optional image format to convert all uploaded files into, supports 'jpg'
|
-f, --format <format> An optional image format to convert all uploaded files into, supports 'jpg',
|
||||||
and 'png' [env: PICTRS_FORMAT=]
|
'png', and 'webp' [env: PICTRS_FORMAT=]
|
||||||
-m, --max-file-size <max-file-size> Specify the maximum allowed uploaded file size (in Megabytes) [env:
|
-m, --max-file-size <max-file-size> Specify the maximum allowed uploaded file size (in Megabytes) [env:
|
||||||
PICTRS_MAX_FILE_SIZE=] [default: 40]
|
PICTRS_MAX_FILE_SIZE=] [default: 40]
|
||||||
-p, --path <path> The path to the data directory, e.g. data/ [env: PICTRS_PATH=]
|
-p, --path <path> The path to the data directory, e.g. data/ [env: PICTRS_PATH=]
|
||||||
|
@ -59,8 +59,9 @@ dependencies already present
|
||||||
$ git clone https://git.asonix.dog/asonix/pict-rs
|
$ git clone https://git.asonix.dog/asonix/pict-rs
|
||||||
$ cd pict-rs/docker/dev
|
$ cd pict-rs/docker/dev
|
||||||
$ ./dev.sh
|
$ ./dev.sh
|
||||||
$ build
|
$ check # runs cargo check
|
||||||
$ run -- -p data/
|
$ build # runs cargo build
|
||||||
|
$ run -p data/
|
||||||
```
|
```
|
||||||
Development environments are provided for amd64, arm32v7, and arm64v8. By default `dev.sh` will load
|
Development environments are provided for amd64, arm32v7, and arm64v8. By default `dev.sh` will load
|
||||||
into the contianer targetting amd64, but arch arguments can be passed to change the target.
|
into the contianer targetting amd64, but arch arguments can be passed to change the target.
|
||||||
|
@ -70,7 +71,7 @@ $ build
|
||||||
|
|
||||||
# note:
|
# note:
|
||||||
# This command may not work unless qemu-user-static has been configured for your docker instance
|
# This command may not work unless qemu-user-static has been configured for your docker instance
|
||||||
$ run -- -p data/
|
$ run -p data/
|
||||||
```
|
```
|
||||||
|
|
||||||
### API
|
### API
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
shift
|
set -xe
|
||||||
|
|
||||||
cargo build --target=$TARGET
|
cargo build --target=$TARGET
|
||||||
|
|
5
docker/dev/root/usr/bin/check
Executable file
5
docker/dev/root/usr/bin/check
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
cargo check --target=$TARGET
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
shift
|
set -xe
|
||||||
|
|
||||||
cargo run --target=$TARGET -- "$@"
|
cargo run --target=$TARGET -- "$@"
|
||||||
|
|
|
@ -14,7 +14,7 @@ pub(crate) struct Config {
|
||||||
long,
|
long,
|
||||||
env = "PICTRS_ADDR",
|
env = "PICTRS_ADDR",
|
||||||
default_value = "0.0.0.0:8080",
|
default_value = "0.0.0.0:8080",
|
||||||
help = "The address and port the server binds to. Default: 0.0.0.0:8080"
|
help = "The address and port the server binds to."
|
||||||
)]
|
)]
|
||||||
addr: SocketAddr,
|
addr: SocketAddr,
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue