Update readme
This commit is contained in:
parent
7245a9a8cc
commit
8f3de10c93
60
README.md
60
README.md
@ -1,5 +1,63 @@
|
|||||||
# ezshare
|
# ezshare
|
||||||
|
|
||||||
|
## Server
|
||||||
|
|
||||||
|
Running a server using docker:
|
||||||
|
|
||||||
|
```text
|
||||||
|
# First, build the image
|
||||||
|
docker build -t ezshare:latest .
|
||||||
|
|
||||||
|
# Then run an interactive container to generate certificates
|
||||||
|
# This will generate CA, server and client certs in /var/ezshare
|
||||||
|
docker run --rm -it -v /var/ezshare:/data ezshare:latest sh
|
||||||
|
# Run this inside the container
|
||||||
|
ezshare cert gen-all --out-dir /data/certs
|
||||||
|
exit
|
||||||
|
|
||||||
|
# Then copy ezshare.example.toml to /var/ezshare/ezshare.toml
|
||||||
|
# Edit the config, making sure to point certificates to /data/server.pem etc
|
||||||
|
|
||||||
|
# Run the server
|
||||||
|
docker run --rm -d -v /var/ezshare:/data ezshare:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
## Client
|
||||||
|
|
||||||
|
Compile the client:
|
||||||
|
```text
|
||||||
|
go build -o ezshare cmd/ezshare.go
|
||||||
|
```
|
||||||
|
|
||||||
|
Copy the resulting binary somewhere into `$PATH`. Then generate an empty client config using `ezshare client init-config`.
|
||||||
|
Copy certificates from server (`srv.pem`, `client.pem`, `client.key`) to the same dir as the generated config.
|
||||||
|
Edit the config-file, and update the `Client` section with correct default-server and path to certificates.
|
||||||
|
|
||||||
|
Client should then be ready for use.
|
||||||
|
|
||||||
|
```text
|
||||||
|
NAME:
|
||||||
|
ezshare client - Client commands
|
||||||
|
|
||||||
|
USAGE:
|
||||||
|
ezshare client command [command options] [arguments...]
|
||||||
|
|
||||||
|
COMMANDS:
|
||||||
|
get Get file with id
|
||||||
|
upload Upload file(s)
|
||||||
|
delete Delete file with id
|
||||||
|
list List files
|
||||||
|
config-init Initialize default config
|
||||||
|
help, h Shows a list of commands or help for one command
|
||||||
|
|
||||||
|
OPTIONS:
|
||||||
|
--addr value Address of server.
|
||||||
|
--help, -h show help (default: false)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
### Recompile proto-files
|
### Recompile proto-files
|
||||||
|
|
||||||
`protoc --go_out=. --go-grpc_out=. --go_opt=module=gitea.benny.dog/torjus/ezshare --go-grpc_opt=module=gitea.benny.dog/torjus/ezshare protos/ezshare.proto`
|
`protoc --go_out=. --go-grpc_out=. --go_opt=module=gitea.benny.dog/torjus/ezshare --go-grpc_opt=module=gitea.benny.dog/torjus/ezshare protos/ezshare.proto`
|
||||||
|
Loading…
Reference in New Issue
Block a user