Add docker based quickstart to README

This commit is contained in:
Maurizio Porrato 2021-05-18 14:16:18 +01:00
parent 221b035142
commit 839d97a9a7
Signed by: guru
GPG Key ID: C622977DF024AC24
1 changed files with 11 additions and 11 deletions

View File

@ -19,6 +19,17 @@ worth my time.
## How
### Quickstart
To run a test service locally on your machine:
```shell
mkdir $HOME/ubs-data
docker run -d -v $HOME/ubs-data:/data -p 9999:8090 registry.gitlab.com/mporrato/ubrowsersync/ubsserver
```
Then point the xBrowserSync browser extension to `http://127.0.0.1:9999`.
### Building
You can get prebuilt binaries for a number of platforms from the gitlab repository in the "Download artifacts" section.
@ -26,10 +37,6 @@ To build from source, just run:
`go install ./cmd/ubsserver`
It is also possible to build a very basic Docker container image by running:
`docker build -t ubsserver -f docker/ubsserver/Dockerfile .`
### Running
To run the binary you just built:
@ -52,13 +59,6 @@ There are a few command line flags that can be used to change the behaviour of t
- `-maxsize $size`: changes the maximum size of a sync (in bytes) that can be accepted by the API. The default is set
to 512000.
If you built the container image, you can run the containerised version:
`docker run -it --rm -v /tmp/data:/data -p 8888:8090 localhost/ubsserver`
You can replace `/tmp/data` with the name of the directory where you want to store sync data and `8888` with the port
where you want to expose the API service.
## Roadmap
There are a few missing features that I would like to add.