obsidian #8

Merged
kevinheyer merged 4 commits from obsidian into main 2025-03-24 20:15:16 +00:00
3 changed files with 46 additions and 0 deletions
Showing only changes of commit 4b0f042b9a - Show all commits

9
obisidian/.env-example Normal file
View file

@ -0,0 +1,9 @@
# OBSIDIAN Version (Standard: latest)
OBSIDIAN_VERSION=latest
# OBSIDIAN Domain
OBSIDIAN_DOMAIN=obsidian.example.com
# OBSIDIAN CouchDB Config
OBSIDIAN_COUCHDB_USER=couchdb_user
OBSIDIAN_COUCHDB_PASSWORD=couchdb_password

0
obisidian/data/local.ini Normal file
View file

View file

@ -0,0 +1,37 @@
---
services:
couchdb:
image: couchdb:${OBSIDIAN_COUCHDB_VERSION:-latest}
container_name: obsidian-livesync
environment:
- COUCHDB_USER=${OBSIDIAN_COUCHDB_USER:?error}
- COUCHDB_PASSWORD=${OBSIDIAN_COUCHDB_PASSWORD:?error}
volumes:
- couchdb-data:/opt/couchdb/data
- ./data/local.ini:/opt/couchdb/etc/local.ini
restart: unless-stopped
networks:
- traefik
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.routers.obsidian-livesync.rule=Host(`${OBSIDIAN_DOMAIN}`)"
- "traefik.http.routers.obsidian-livesync.entrypoints=websecure"
- "traefik.http.routers.obsidian-livesync.service=obsidian-livesync"
- "traefik.http.services.obsidian-livesync.loadbalancer.server.port=5984"
- "traefik.http.routers.obsidian-livesync.tls=true"
- "traefik.http.routers.obsidian-livesync.middlewares=obsidiancors"
# The part needed for CORS to work on Traefik 2.x starts here
- "traefik.http.middlewares.obsidiancors.headers.accesscontrolallowmethods=GET,PUT,POST,HEAD,DELETE"
- "traefik.http.middlewares.obsidiancors.headers.accesscontrolallowheaders=accept,authorization,content-type,origin,referer"
- "traefik.http.middlewares.obsidiancors.headers.accesscontrolalloworiginlist=app://obsidian.md,capacitor://localhost,http://localhost"
- "traefik.http.middlewares.obsidiancors.headers.accesscontrolmaxage=3600"
- "traefik.http.middlewares.obsidiancors.headers.addvaryheader=true"
- "traefik.http.middlewares.obsidiancors.headers.accessControlAllowCredentials=true"
networks:
traefik:
external: true
volumes:
couchdb-data: