Add docker based quickstart to README
This commit is contained in:
parent
221b035142
commit
839d97a9a7
22
README.md
22
README.md
|
@ -19,6 +19,17 @@ worth my time.
|
||||||
|
|
||||||
## How
|
## 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
|
### Building
|
||||||
|
|
||||||
You can get prebuilt binaries for a number of platforms from the gitlab repository in the "Download artifacts" section.
|
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`
|
`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
|
### Running
|
||||||
|
|
||||||
To run the binary you just built:
|
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
|
- `-maxsize $size`: changes the maximum size of a sync (in bytes) that can be accepted by the API. The default is set
|
||||||
to 512000.
|
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
|
## Roadmap
|
||||||
|
|
||||||
There are a few missing features that I would like to add.
|
There are a few missing features that I would like to add.
|
||||||
|
|
Loading…
Reference in New Issue