Skip to content

Commit 30ad027

Browse files
committed
Updated README.
1 parent 2b3fc64 commit 30ad027

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66

77
xBrowserSync is a free tool for syncing browser data between different browsers and devices, built for privacy and anonymity. For full details, see [www.xbrowsersync.org](https://www.xbrowsersync.org/).
88

9-
This repository contains the docker files required to get your own [xBrowserSync API service](https://github.com/xbrowsersync/api) up and running in moments, either by running the API image alone or by orchestrating a production-ready HTTPS service with database and reverse proxy.
9+
This repository contains the Docker files required to get your own [xBrowserSync API service](https://github.com/xbrowsersync/api) up and running in moments, either by running the API image alone or by orchestrating a production-ready HTTPS service with database and reverse proxy.
1010

11-
12-
### Running the API image
11+
## Running the API image
1312

1413
Running the API image alone requires that you have a MongoDB instance and, ideally, a web server to reverse proxy the API behind.
1514

16-
1. Create a file named `settings.json` and include any required custom [settings](https://github.com/xbrowsersync/api#3-modify-configuration-settings) values, such as those for connecting to your MongoDB instance. For example, if you are running docker and MongoDB on a windows server, you would point the service at the MongoDB instance running on the host using the following settings:
15+
1. Create a file named `settings.json` and include any required custom [settings](https://github.com/xbrowsersync/api#3-modify-configuration-settings) values, such as those for connecting to your MongoDB instance. For example, if you are running Docker and MongoDB on a windows server, you would point the service at the MongoDB instance running on the host using the following settings:
1716

1817
```
1918
{
@@ -31,22 +30,25 @@ Running the API image alone requires that you have a MongoDB instance and, ideal
3130
3. Run the following command to start an API container, providing the actual path to the `settings.json` file created in step 1. The service will be exposed via port 8080. If you did not create the environment variables in step 2, you will need to provide the actual username and password values in line, i.e. `-e XBROWSERSYNC_DB_USER=YourDatabaseUsername -e XBROWSERSYNC_DB_PWD=YourDatabasePassword`:
3231
3332
```
34-
sudo docker run --name xbs-api -p 8080:8080 -e XBROWSERSYNC_DB_USER -e XBROWSERSYNC_DB_PWD -v /path/to/settings.json:/usr/src/api/config/settings.json -d xbrowsersync/api
33+
$ sudo docker run --name xbs-api -p 8080:8080 -e XBROWSERSYNC_DB_USER -e XBROWSERSYNC_DB_PWD -v /path/to/settings.json:/usr/src/api/config/settings.json -d xbrowsersync/api
3534
```
3635
3736
You can now access your xBrowserSync API service at http://127.0.0.1:8080.
3837
39-
40-
### Running a production-ready service
38+
## Running a production-ready service
4139
4240
If you do not already have a MongoDB instance or are intending to expose your xBrowserSync service over the internet then it is recommended to use the provided [`docker-compose.yml`](https://github.com/xbrowsersync/api-docker/blob/master/docker-compose.yml) which will create fully configured containers for a MongoDB database, the xBrowserSync API and a [traefik](https://traefik.io/) reverse proxy web server to run in front of the API. Traefik automatically acquires and updates SSL certificates from [Let's Encrypt](https://letsencrypt.org/) so that your xBrowserSync API service will run securely over HTTPS.
4341
44-
1. Clone the [api-docker](https://github.com/xbrowsersync/api-docker/) GitHub repo locally.
42+
1. Clone the [api-docker](https://github.com/xbrowsersync/api-docker/) GitHub repo:
43+
44+
```
45+
$ git clone https://github.com/xbrowsersync/api-docker.git
46+
```
4547
4648
2. Secure the [`acme.json`](https://github.com/xbrowsersync/api-docker/blob/master/acme.json) file as per traefik's requirements:
4749
4850
```
49-
sudo chmod 600 acme.json
51+
$ sudo chmod 600 acme.json
5052
```
5153
5254
3. Open the [`.env`](https://github.com/xbrowsersync/api-docker/blob/master/.env) file in a text editor and update the `XBS_API_HOSTNAME` value to correspond to the host name that the API service will be exposed over (ensure you have configured your DNS provider to point the desired host name to your host's IP address). Also, change the `XBS_DB_USERNAME` and `XBS_DB_PASSWORD` values to any of your choosing.
@@ -58,12 +60,11 @@ If you do not already have a MongoDB instance or are intending to expose your xB
5860
6. Run the following command to start the containers:
5961
6062
```
61-
sudo docker-compose up -d
63+
$ sudo docker-compose up -d
6264
```
6365
6466
You can now access your xBrowserSync API service over HTTPS at the value of `XBS_API_HOSTNAME` defined in the [`.env`](https://github.com/xbrowsersync/api-docker/blob/master/.env) file.
6567
66-
67-
### Issues and feature requests
68+
## Issues and feature requests
6869
6970
Please log Docker-related issues in the [api-docker Issues list](https://github.com/xbrowsersync/api-docker/issues), if you have found an issue with the xBrowserSync API itself or wish to request a new feature, do so in the [api Issues list](https://github.com/xbrowsersync/api/issues/).

0 commit comments

Comments
 (0)