gendesign/docker-compose.obsidian.yml
lekss361 d50626b32a fix
2026-05-11 09:57:40 +03:00

48 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Obsidian Self-hosted LiveSync stack — CouchDB.
#
# Деплоится ОТДЕЛЬНО от main стека:
# docker compose -f docker-compose.obsidian.yml up -d
#
# Связан с main-stack через external network `gendesign_shared`. Caddy в
# main-stack маршрутизирует obsidian.gendsgn.ru → couchdb:5984 через эту сеть.
#
# Сеть должна быть создана один раз вручную:
# docker network create gendesign_shared
# (или используй scripts/setup-obsidian-stack.sh).
services:
couchdb:
image: couchdb:3
container_name: gendesign-couchdb
restart: unless-stopped
# env_file подгружается ДО env: + interpolation. Это критично — без него
# compose видит пустой COUCHDB_PASSWORD и couchdb падает в Admin-Party mode.
env_file:
- path: ./backend/.env.runtime
required: false
- path: ./backend/.env
required: false
environment:
COUCHDB_USER: ${COUCHDB_USER:-obsidian}
COUCHDB_PASSWORD: ${COUCHDB_PASSWORD:?must be set in backend/.env.runtime}
volumes:
- couchdb_data:/opt/couchdb/data
- couchdb_config:/opt/couchdb/etc/local.d
expose:
- "5984"
networks:
- shared
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:5984/_up"]
interval: 30s
timeout: 10s
retries: 5
volumes:
couchdb_data:
couchdb_config:
networks:
shared:
external: true
name: gendesign_shared