mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2024-12-12 09:04:06 +02:00
Moved enable_cors to the right section. Added explanation for difference of versions. Added bind_address for making sure the container uses all interfaces given. Added spaces between 'origins' and removed spaces between the 'methods' elements because it's like this in the official Documentation. Added a write permission warning since many newbies had this mistake with couchdb.
This commit is contained in:
parent
8a75d41cbb
commit
ae451e005e
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
The easiest way to set up a CouchDB instance is using the official [docker image](https://hub.docker.com/_/couchdb).
|
The easiest way to set up a CouchDB instance is using the official [docker image](https://hub.docker.com/_/couchdb).
|
||||||
|
|
||||||
Some initial configuration is required. Create a `local.ini` to use Self-hosted LiveSync as follows:
|
Some initial configuration is required. Create a `local.ini` to use Self-hosted LiveSync as follows ([CouchDB has to be version 3.2 or higher](https://docs.couchdb.org/en/latest/config/http.html#chttpd/enable_cors), if lower `enable_cors = true` has to be under section `[httpd]` ):
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[couchdb]
|
[couchdb]
|
||||||
@ -14,6 +14,7 @@ max_document_size = 50000000
|
|||||||
[chttpd]
|
[chttpd]
|
||||||
require_valid_user = true
|
require_valid_user = true
|
||||||
max_http_request_size = 4294967296
|
max_http_request_size = 4294967296
|
||||||
|
enable_cors = true
|
||||||
|
|
||||||
[chttpd_auth]
|
[chttpd_auth]
|
||||||
require_valid_user = true
|
require_valid_user = true
|
||||||
@ -21,13 +22,13 @@ authentication_redirect = /_utils/session.html
|
|||||||
|
|
||||||
[httpd]
|
[httpd]
|
||||||
WWW-Authenticate = Basic realm="couchdb"
|
WWW-Authenticate = Basic realm="couchdb"
|
||||||
enable_cors = true
|
bind_address = 0.0.0.0
|
||||||
|
|
||||||
[cors]
|
[cors]
|
||||||
origins = app://obsidian.md,capacitor://localhost,http://localhost
|
origins = app://obsidian.md, capacitor://localhost, http://localhost
|
||||||
credentials = true
|
credentials = true
|
||||||
headers = accept, authorization, content-type, origin, referer
|
headers = accept, authorization, content-type, origin, referer
|
||||||
methods = GET, PUT, POST, HEAD, DELETE
|
methods = GET,PUT,POST,HEAD,DELETE
|
||||||
max_age = 3600
|
max_age = 3600
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -48,7 +49,7 @@ $ docker run -d --restart always -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=passw
|
|||||||
*Remember to replace the path with the path to your local.ini*
|
*Remember to replace the path with the path to your local.ini*
|
||||||
|
|
||||||
### Docker Compose
|
### Docker Compose
|
||||||
Create a directory, place your `local.ini` within it, and create a `docker-compose.yml` alongside it. The directory structure should look similar to this:
|
Create a directory, place your `local.ini` within it, and create a `docker-compose.yml` alongside it. Make sure to have write permissions for `local.ini` and the about to be created `data` folder after the container start. The directory structure should look similar to this:
|
||||||
```
|
```
|
||||||
obsidian-livesync
|
obsidian-livesync
|
||||||
├── docker-compose.yml
|
├── docker-compose.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user