Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions svgs/obsidian-livesync.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions templates/compose/obsidian-livesync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# documentation: https://github.com/vrtmrz/obsidian-livesync/blob/main/docs/setup_own_server.md
# slogan: Self-hosted sync backend for Obsidian LiveSync plugin using CouchDB
# category: storage
# tags: obsidian,couchdb,sync,notes,markdown
# logo: svgs/obsidian-livesync.svg
# port: 5984

services:
couchdb:
image: couchdb:3.4.2
environment:
# Tells Coolify to proxy this service on port 5984 at the assigned domain
- SERVICE_FQDN_COUCHDB_5984
# Coolify auto-generates and persists these — find them under Environment Variables
- COUCHDB_USER=${SERVICE_USER_COUCHDB}
- COUCHDB_PASSWORD=${SERVICE_PASSWORD_64_COUCHDB}
# Slightly above max_document_size (50MB) to allow multipart overhead.
# Raise this only if you attach very large files to your notes.
- MAX_HTTP_REQUEST_SIZE=${MAX_HTTP_REQUEST_SIZE:-67108864}
Comment thread
StaiMerr marked this conversation as resolved.
Comment thread
StaiMerr marked this conversation as resolved.
Outdated
volumes:
- type: bind
source: ./local.ini
target: /opt/couchdb/etc/local.ini
content: |
[couchdb]
single_node=true
max_document_size = 50000000

[chttpd]
require_valid_user = true
max_http_request_size = ${MAX_HTTP_REQUEST_SIZE:-67108864}
Comment thread
StaiMerr marked this conversation as resolved.
Outdated
Comment thread
StaiMerr marked this conversation as resolved.
Outdated

[chttpd_auth]
require_valid_user = true
authentication_redirect = /_utils/session.html

[httpd]
WWW-Authenticate = Basic realm="couchdb"
enable_cors = true

[cors]
origins = app://obsidian.md,capacitor://localhost,http://localhost
credentials = true
headers = accept, authorization, content-type, origin, referer
methods = GET, PUT, POST, HEAD, DELETE
max_age = 3600
- couchdb-data:/opt/couchdb/data
healthcheck:
test:
- CMD-SHELL
- curl -f -u "$${COUCHDB_USER}:$${COUCHDB_PASSWORD}" http://localhost:5984/_up
interval: 30s
timeout: 10s
start_period: 40s
retries: 3

volumes:
couchdb-data:
Loading