Add in cloudflare ddns and restructure repo
This commit is contained in:
5
services/obsidian-livesync/.env.example
Executable file
5
services/obsidian-livesync/.env.example
Executable file
@@ -0,0 +1,5 @@
|
||||
# obsidian/.env
|
||||
# Copy to .env and fill in real values. NEVER commit .env.
|
||||
|
||||
COUCHDB_USER=admin
|
||||
COUCHDB_PASSWORD=REPLACE_WITH_STRONG_PASSWORD
|
||||
1
services/obsidian-livesync/README.md
Normal file
1
services/obsidian-livesync/README.md
Normal file
@@ -0,0 +1 @@
|
||||
*Note*: When setting up for the first time you need to create the directories for both the etc and the data and make sure they are owned by the same UID as the CouchDB container (default 5984) to avoid permission issues.
|
||||
38
services/obsidian-livesync/docker-compose.yml
Executable file
38
services/obsidian-livesync/docker-compose.yml
Executable file
@@ -0,0 +1,38 @@
|
||||
services:
|
||||
couchdb:
|
||||
image: couchdb:latest
|
||||
container_name: obsidian-livesync
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- COUCHDB_USER=${COUCHDB_USER}
|
||||
- COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
|
||||
volumes:
|
||||
- ${STORAGE_PATH}/obsidian-livesync/data:/opt/couchdb/data
|
||||
- ${STORAGE_PATH}/obsidian-livesync/local.ini:/opt/couchdb/etc/local.d
|
||||
ports:
|
||||
- 5984:5984
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
# The Traefik Network
|
||||
- "traefik.docker.network=web"
|
||||
# Don't forget to replace 'obsidian-livesync.example.org' with your own domain
|
||||
- "traefik.http.routers.obsidian-livesync.rule=Host(`obsidian-livesync.${DOMAIN}`)"
|
||||
# The 'websecure' entryPoint is basically your HTTPS entrypoint. Check the next code snippet if you are encountering problems only; you probably have a working traefik configuration if this is not your first container you are reverse proxying.
|
||||
- "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"
|
||||
# Replace the string 'letsencrypt' with your own certificate resolver
|
||||
- "traefik.http.routers.obsidian-livesync.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.middlewares.obsidiancors.headers.accessControlAllowOriginList=app://obsidian.md,capacitor://localhost,http://localhost"
|
||||
- "traefik.http.middlewares.obsidiancors.headers.accessControlAllowMethods=GET,POST,PUT,DELETE,OPTIONS,HEAD"
|
||||
- "traefik.http.middlewares.obsidiancors.headers.accessControlAllowHeaders=Authorization,Content-Type,Accept,Origin,X-Requested-With"
|
||||
- "traefik.http.middlewares.obsidiancors.headers.accessControlAllowCredentials=true"
|
||||
- "traefik.http.middlewares.obsidiancors.headers.accessControlMaxAge=86400"
|
||||
- "traefik.http.middlewares.obsidiancors.headers.addVaryHeader=true"
|
||||
- "traefik.http.routers.obsidian-livesync.middlewares=obsidiancors"
|
||||
networks:
|
||||
- web
|
||||
networks:
|
||||
web:
|
||||
external: true
|
||||
Reference in New Issue
Block a user