ezshare/README.md

56 lines
1.2 KiB
Markdown

# ezshare
## Server
Running a server using docker:
```text
# First, build the image
docker build -t ezshare:latest .
Copy config file to /var/ezshare/ezshare.toml (or see ezshare.minimal.env to see how to set config-values using envvars)
# Run the server
docker run --rm -d -v /var/ezshare:/data -e EZSHARE_CONFIG=/data/ezshare.toml ezshare:latest
```
## Client
Compile the client:
```text
go build -o ezshare cmd/ezshare.go
```
Generate client config, and fetch needed certificates:
```
./ezshare client login --overwrite "https://ezshare.example.org"
username: admin
password:
```
```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
`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`