ezshare/README.md

57 lines
1.3 KiB
Markdown
Raw Normal View History

2022-01-03 19:58:25 +00:00
![status-badge](https://ci.t-juice.club/api/badges/torjus/ezshare/status.svg)
2021-12-03 22:04:09 +00:00
# ezshare
2021-12-04 10:52:28 +00:00
## 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)
2021-12-04 10:52:28 +00:00
# Run the server
docker run --rm -d -v /var/ezshare:/data -e EZSHARE_CONFIG=/data/ezshare.toml ezshare:latest
2021-12-04 10:52:28 +00:00
```
## 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:
```
2021-12-04 10:52:28 +00:00
```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
2021-12-03 22:04:09 +00:00
### Recompile proto-files
2021-12-04 10:52:28 +00:00
`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`